Answer the question
In order to leave comments, you need to log in
Does the IFS variable break the command?
Excerpt from the script:
WHATTOBACK="-P:Music:-P:Фильмы/Старые:-P:Новая папка"
OIFS=$IFS
IFS=':'
dar -R /media/Storage/ -c /media/backup/`date -I` \
-Z "*.[Ff][Ll][Vv]" -Z "*.[Mm][Kk][Vv]" \
-Z "*.[Gg][Zz}" -Z "*.[Xx][Zz]" \
$WHATTOBACK -D
IFS=$OIFS
Answer the question
In order to leave comments, you need to log in
> Am I using IFS correctly?
I don't know if you are using it correctly IFS
, but it all looks rather dumb. Actually, you want to write:
IFS=':' read -ra WHATTOBACK <<< "$WHATTOBACK"
dar ... "${WHATTOBACK[@]}"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question