From: yy <yiyu.jgl@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] removing spaces from filenames
Date: Wed, 21 Mar 2012 14:20:17 +0100 [thread overview]
Message-ID: <CADErNDsJhiaoDRdfvmyZLtTwrsXVqK1V1CQzC5SwPGdS+HbsYg@mail.gmail.com> (raw)
In-Reply-To: <CAM6ozu6EKxDage9itHJnZbDmRd94b_VpdS6jq9uw=8rdwsVpnQ@mail.gmail.com>
2012/3/21 Peter A. Cejchan <tyapca7@gmail.com>:
> for (old in `{9 ls *.$EXT}) {
Here you are iterating over the elements of `{9 ls *.$EXT}, sepparated
by $ifs. Therefore, spaces are breaking your lines into word fields.
This is not what you want.
Your second example directly process whole lines (uses sed), so it
works. I think you will get what you want if you replace this line
with:
ifs='
' for (old in `{9 ls *.$EXT}) {
--
- yiyus || JGL .
next prev parent reply other threads:[~2012-03-21 13:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 9:26 Peter A. Cejchan
2012-03-21 13:20 ` yy [this message]
[not found] ` <CADErNDsJhiaoDRdfvmyZLtTwrsXVqK1V1CQzC5SwPGdS+HbsYg@mail.gmail.c>
2012-03-21 16:36 ` erik quanstrom
2012-03-22 7:05 ` Peter A. Cejchan
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=CADErNDsJhiaoDRdfvmyZLtTwrsXVqK1V1CQzC5SwPGdS+HbsYg@mail.gmail.com \
--to=yiyu.jgl@gmail.com \
--cc=9fans@9fans.net \
/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.
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).