Re:Use Long Options in Scripts
by p_wood on Saturday March 22, 2025 @11:15AM
(#43446304)
> eval "$CMD"
That means you will eval all the filenames, so if you have a file with spaces in it will appear as two files, if there is a `$` in the name it will trigger parameter substitution and so on for the other shell meta-characters.
Re:Use Long Options in Scripts
by amelius on Saturday March 22, 2025 @11:26AM
(#43446415)
Yes, that could be true. I'm not great in Bash. Be careful. These types of error are why I don't use Bash. I just wanted to give an example in a commonly used scripting language. The main point here is to check ARG_MAX.
That means you will eval all the filenames, so if you have a file with spaces in it will appear as two files, if there is a `$` in the name it will trigger parameter substitution and so on for the other shell meta-characters.