Can this be done more nicely (echo a placeholder for another command)
echo $(for x in *;do echo $x|sed 's/\([ \t\n\r\v\f\;#]\)/\^\1/g'|sed 's/$/\;/g';done)
Also, there should be no ; after the last filename.
example usage of the command 'doit' is
doit files[ list-of-files ] 'flags[foo;bar;other^ flag]options[value^ 1value^ array[1;2;3]]'
It is possible to escape whitespace internally (in doit), since it does not affect the doits tokenizer (it just eats every whitespace not following ^). As well as the good extensibility of the syntax, the code for reading configuration files and the command line is the same.
The sed thing works expect that it adds a ; too much at the end. However, logic for adding ; inside doit is not hard to implement so this last step is not nessecary. What I dislike, is that I need a loop to escape each argument individually. Just echo * | sed ... would not do it since echo destroys information (printing everything delimited by whitespace).
Similar problem: I want to add echo ~/my_progs/* colon separated to the path variable.