Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

SHELL SCRIPTING

Name: Anonymous 2009-08-28 15:15

so i have a for loop in a bash script:

for var in file; do
   echo $var
   continue
done

the file contains plain text:
11111111
22222222
3333 3333
44444444

the output should exactly look like the input file, but the above for loop gives me that:
11111111
22222222
3333
3333
44444444

tl;dr:
so how do i make for ignore the space?

Name: Anonymous 2009-08-28 17:46

>>16
Oh, yes. In fact SICP helps with shell scripting.
back to /prog/, please.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List