Shell

From dankwiki
Revision as of 03:37, 28 February 2012 by Dank (talk | contribs) (Created page with "==IFS== To set IFS to newline, use IFS=$'\n'. This allows <tt>find</tt> output containing horizontal whitespace to be picked up and used in e.g. <tt>for</tt> loop. * If you ca...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

IFS

To set IFS to newline, use IFS=$'\n'. This allows find output containing horizontal whitespace to be picked up and used in e.g. for loop.

  • If you can use the output with xargs, then just use find's -print0 predicate and xargs's -0 option.