Re: For Loops and Space in Names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09Dec2008 18:53, Dave Ihnat <dihnat@xxxxxxxxxx> wrote:
| On Wed, Dec 10, 2008 at 11:17:05AM +1100, Cameron Simpson wrote:
| > is totally reliable and does not need $IFS hacking (which amounts to
| > "guess a char I might not see in a filename).
| 
| Hmm...I don't have as much problem with it, but that may be because
| since I started using Unix around 1980, using IFS to parse records has
| been a useful tool.  Something like:
| 
|   SAVIFS=$IFS
|   IFS=:
|   
|   while read INLINE </etc/passwd
|   do

Yes, but I wasn't talking about using $IFS for records (which is just dandy),
I was talking about the earlier example on the page for coping with spaces in
filenames.

BTW, you know that this:

  while read inline </etc/passwd
  do
  ...
  done

will repeatedly read the first line, versus:

  while read inline
  do
  ...
  done </etc/passwd

which reads the lines in sequence? I know you do, but plenty of other
folks won't notice.

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

Try not, do. Do not, try not.   - Yoda

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux