fix: bug in sed command
This commit is contained in:
parent
2ecf130cf4
commit
9ae192f7a9
2
fresh.sh
2
fresh.sh
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user