Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Surely this can be done easier...
- X-seq: zsh-users 6962
- From: DervishD <raul@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Surely this can be done easier...
- Date: Thu, 25 Dec 2003 00:59:42 +0100
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <1031224214306.ZM12380@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: Pleyades
- References: <20031224211027.GA30731@DervishD> <1031224214306.ZM12380@xxxxxxxxxxxxxxxxxxxxxxx>
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