Re: For Loops and Space in Names

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

 



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
  	set $INLINE
	(process fields)
  done;
  IFS=$SAVIFS

(Yeah, if it gets too complicated, shift to awk.)

Cheers,
--
	Dave Ihnat
	President, DMINET Consulting, Inc.
	dihnat@xxxxxxxxxx

-- 
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]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux