fix quotation issues by using a bash array

see: http://mywiki.wooledge.org/BashFAQ/050
This commit is contained in:
lalyos
2019-11-30 21:51:32 +01:00
parent d942e6fa59
commit cf5d3e73c0

View File

@@ -2,10 +2,9 @@
# Skip the config file name argument.
shift
args=""
for arg in $@; do
args="$args -e $arg"
args=()
for arg in "$@"; do
args+=(-e "$arg")
done
cat - | sed $args
sed "${args[@]}"