Setting env variable to newline char?
- From: skull_leader7@xxxxxxxxx
- Date: 2 May 2007 10:48:29 -0700
How can I set an environment variable to the newline character in
normal bourne shell?
I want to set the $IFS variable to only be the newline character,
because I am trying to run a for loop against a file, line by line,
but the lines have spaces so the default value of $IFS messes me up -
I want it to split by lines.
i.e. for line in $(cat myfile.txt)
Any help appreciated, thanks!
.
- Follow-Ups:
- Re: Setting env variable to newline char?
- From: Kenan Kalajdzic
- Re: Setting env variable to newline char?
- From: Jean-Rene David
- Re: Setting env variable to newline char?
- Prev by Date: Re: How do I change line-wrapped lines to un-wrapped lines in a file?
- Next by Date: Re: Setting env variable to newline char?
- Previous by thread: bc and fload number less than zero
- Next by thread: Re: Setting env variable to newline char?
- Index(es):
Relevant Pages
|
|