Wierd shell bug could be useful
Harald.Eikrem at elab-runit.sintef.no
Harald.Eikrem at elab-runit.sintef.no
Thu Jan 31 07:06:09 AEST 1991
said root at tndsyd.oz [which is no valid internet mail address --H.E]:
> Try this out:
> $ echo > foo '
> > garbage
> > ...
> > ...
> > ...
> > ...
> > '
> $
>
> Then cat foo. This is a wierd bug but could be used instead of:
> cat << ! > foo
> garbage
> ...
> ...
> ...
> ...
> !
>
> A user friendly bug !!!
What do you mean is a bug here? This behaves perfecly normal to me, and of
course the two methods produce different results.
$ echo > foo '
> bar
> and
> grill
> '
$ cat foo
bar
and
grill
$ cat << ! > foo
> bar
> and
> grill
> !
$ cat foo
bar
and
grill
$
--Harald E
More information about the Comp.unix.shell
mailing list