
11 Aug
2005
11 Aug
'05
8:28 p.m.
Does anyone know how to get bash to split the output of a command enclosed in `` the same way it would split the command line if typed in? Everything i do to try to escape spaces ends up not working. Eg, this command (for sorting the songs from _The Dark Side Of Phobos_ in level order) produces a string that can be cut'n'pasted to bash, but if i change the echo command to mplayer, it doesn't work as bash split on spaces. echo `find . -name '*E1M*' | awk '{print $2,$0}' FS='[()]' | sort | sed -e 's/[^ ]* \(.*\)/\1/' -e 's/\([ ()]\)/\\\\\1/g'`