gibney.org : Technology : Programming : BASH : Tell the bash to split by newline character


just a logo :)

search:


See as: raw | code

terms of service | imprint

gibney.org
is powered by m1d1





Tell the bash to split by newline character
(Entry Nr. 127, by user 1 | edit)
# tell the bash to split only by newline character:

IFS=$'\n'

# Looks strange, but works. If you do something like this:

for f in `find`; do echo $f; done

# You will now only do a loop for every file and not twice if the file contains spaces.
Create a new entry at this position