[Swan-dev] understanding output of the tests

Paul Wouters paul at nohats.ca
Thu Apr 3 01:58:21 EEST 2014


On Wed, 2 Apr 2014, D. Hugh Redelmeier wrote:

> | Why are the quotes needed when using : ?
>
> : is really a command that does nothing, rather than a comment.
> So redirection and variable expansion are done on the operands.
>
> 	: >file
> would actually create an empty file "file".
>
>
>
> 	: '>file'
> would act like
> 	# >file
>
> (# was introduced with the Bourne Shell.  The original UNIX shell
> (before the 7th Edition) didn't have it.  ":" served two purposes in
> the old shell: comments and labels (for control flow).  The Bourne
> Shell was a great advance in so many ways.)

If that's the only difference, I think we can deal with not using < > | & %

Paul


More information about the Swan-dev mailing list