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

howto include space charactere

Status
Not open for further replies.

rvarman

IS-IT--Management
Apr 24, 2003
91
FR
each line i a file has many space caracters.
But i'm unable to print spaces in the variables?

a="abcd"
b=" " #4 spaces
c="efgh"

echo $a$b$c > file1
gives "abcd efgh"
wheras i want,
"abcd efgh"

your help please



 
Hi:

Place everything in double quotes:

echo "$a$b$c" > file1

Regards,


Ed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top