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
No comments:
Post a Comment