поправил sed
This commit is contained in:
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"
|
||||
|
Loading…
Reference in New Issue
Block a user