поправил sed

This commit is contained in:
Евгений Храмов 2023-04-02 15:18:28 +03:00
parent c17f08b7e6
commit 207bb2c688

@ -8,7 +8,7 @@ do
# Check if the line is in the file
grep -qF "$line1_to_remove" "$file_path"
if [ $? -eq 0 ]; then
sed -i "/$line_to_remove/d" "$file_path"
sed -i "/$line1_to_remove/d" "$file_path"
echo "Alias hlna удалён из $file_path"
else
echo "Alias hlna нет в $file_path"
@ -16,7 +16,7 @@ do
grep -qF "$line2_to_remove" "$file_path"
if [ $? -eq 0 ]; then
sed -i "/$line_to_remove/d" "$file_path"
sed -i "/$line2_to_remove/d" "$file_path"
echo "Alias hlna-bot удалён из $file_path"
else
echo "Alias hlna-bot нет в $file_path"