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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating variables with 'spaces'

Status
Not open for further replies.

jping45

Technical User
Aug 22, 2001
49
US
I have an input file:
1) host1
2) host2
3) host3
4) hosta
5) hostb
6) hostc
so on and so forth. I want to treat "1) host1" as a variable, however I've tried several combinations and can only get variables assigned as "1)" and "host1". Any help would be appreciated.
 
Code:
while read line
do
   echo $line
done < inputfile

Regards,
Chuck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top