How do you retain leading spaces while reading from a file in UNIX? One way to do this is change the variable used to set the Internal Field Separator (IFS) in UNIX and set it to nothing.
ORIGINAL_IFS=$IFS
IFS=
while read LINE
do
...
...
...
done < $IN_FILE
IFS=$ORIGINAL_IFS
Subscribe to:
Post Comments (Atom)
A TRIP TO BHANDUP PUMPING STATION - the birdwatchers paradise
"A Picture from Bhandup Pumping Station" I am a nature lover, and I often like to go birdwatching with my dad. We had read that ...

-
Suppose you have some data for sales of some 4 products (A, B, C, D) for the 4 quarters of a year & for 5 regions in the country, an ...
-
"A Picture from Bhandup Pumping Station" I am a nature lover, and I often like to go birdwatching with my dad. We had read that ...
-
With Robot (Endhiran) Southern Superstar Rajnikant has shown his box-office might. Here are some fun facts that make him folk lore. 1. Ra...
No comments:
Post a Comment