using set in a csh script

Michael Salmon epames at eos.ericsson.se
Thu Oct 25 17:33:25 AEST 1990


In article <21752 at dime.cs.umass.edu> martha at cs.umass.edu (Martha S. DasSarma) writes:
>
>	I am trying to do set a variable that includes spaces, but the
>	set deletes them.
>	I type:
>
>	$ set t="Mon   5"
>	$ echo $t
>	$ Mon 5
>
>	What happens is that the set deletes the extra spaces I put 
>	in the set.
>	How could I preserve the spaces?

Set hasn't deleted the spaces, they were deleted in the parsing of echo, just as if
you typed $ echo Mon   5. Try $ echo "$t".

Regards
   Michael Salmon



More information about the Comp.unix.shell mailing list