fix: bug in sed command

This commit is contained in:
qhga 2021-12-22 17:46:36 +01:00 committed by qhga
parent 2ecf130cf4
commit 9ae192f7a9
Signed by: phga
GPG Key ID: 5249548AA705F019

View File

@ -192,7 +192,7 @@ com() {
add_after() { add_after() {
# Example: # Example:
# add_after "Color" "ILoveCandy" "$HOME/test/pacman.conf" # add_after "Color" "ILoveCandy" "$HOME/test/pacman.conf"
sed -i '/$2/d' sed -i '/'"$2"'/d'
sed -i '/'"$1"'/a '"$2"'' $3 sed -i '/'"$1"'/a '"$2"'' $3
} }