Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Surely this can be done easier...



    Hi Bart :)

 * Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> dixit:
> }     I have a file containing a list of files, and I want those files
> } in a command line. The problem is that the filenames contain weird
> } characters, spaces and so on.
> This is pretty close to a FAQ.

    Yes O:) You can see the solution in the Examples of section
'Parameter Expansion' in the manual (well, now that I know what to
look for).
 
> 	$(<listing)
> 	"$(<listing)"
> 	${(f)"$(<listing)"}
> 	command ${(f)"$(<listing)"}

    Oh, I see where was the problem :(( It was entirely my fault. I
was doing more or less the same (I even tried with ps:\n:), but using
$(cat listing) instead of the command substitution. The problem was
that I was using 'print' as the command and I saw the lines without
quoting, of course! What I meant, what I wanted to check, is pressing
Tab and seeing the list of files from 'listing' quoted and put on the
command line. Instead I pressed Enter and, obviously, I saw the
output of 'print', which is all files together with no quoting or
separation.

    The solution, as always, is trying to sleep a bit more :((( Sorry
for the noise and thanks a lot for your answer...

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/



Messages sorted by: Reverse Date, Date, Thread, Author