mirror of
https://github.com/monlor/MIXBOX-ARCHIVE.git
synced 2026-03-13 00:41:24 +00:00
2020-03-03
This commit is contained in:
@@ -16,15 +16,15 @@ sedsh() {
|
||||
[ -z "$1" -o -z "$2" -o -z "$3" ] && echo "null sedsh params!" && exit 1
|
||||
if [ "$(uname -s)" = "Darwin" ]; then
|
||||
if [ "$1" = "s" ]; then
|
||||
sed -i "" "s#$2#$3#g" "$4"
|
||||
sed -i "" "s/$2/$3/g" "$4"
|
||||
elif [[ "$1" = "d" ]]; then
|
||||
sed -i "" "#$2#d" "$3"
|
||||
sed -i "" "/$2/d" "$3"
|
||||
fi
|
||||
else
|
||||
if [[ "$1" = "s" ]]; then
|
||||
sed -i "s#$2#$3#g" "$4"
|
||||
sed -i "s/$2/$3/g" "$4"
|
||||
elif [[ "$1" = "d" ]]; then
|
||||
sed -i "#$2#d" "$3"
|
||||
sed -i "/$2/d" "$3"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user