Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems in lines begin with spaces 1

Status
Not open for further replies.

Diogo

Technical User
Joined
Mar 22, 2001
Messages
143
Location
PT
Hi.

I have one the file "diogo.txt" with this format:
one
two
thee
four


and when i execute the next command:
{
while read line_data
do
echo "${line_data}"" "
done
} < diogo.txt


it gives me:
one
two
thee
four


Is there any way, to see in the right way.

Thanks any way.
DR
 
Hi

It's because the lines are padded with a separator character present in the [tt]$IFS[/tt] value. Put this before that code :
Code:
IFS=""

Feherke.
 
Thaks.

It is just that.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top