From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: Surely this can be done easier...
Date: Wed, 24 Dec 2003 21:43:06 +0000 [thread overview]
Message-ID: <1031224214306.ZM12380@candle.brasslantern.com> (raw)
In-Reply-To: <20031224211027.GA30731@DervishD>
On Dec 24, 10:10pm, DervishD wrote:
}
} 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.
First you read the entire file like this:
$(<listing)
Next you need to quote that to protect the lines from being joined:
"$(<listing)"
Next you split on line breaks:
${(f)"$(<listing)"}
And that's the argument of the command:
command ${(f)"$(<listing)"}
In some older versions of zsh you need to move the quotes outside the
whole expression:
command "${(f)$(<listing)}"
next prev parent reply other threads:[~2003-12-24 21:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-24 21:10 DervishD
2003-12-24 21:43 ` Bart Schaefer [this message]
2003-12-24 23:59 ` DervishD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1031224214306.ZM12380@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).