[TUHS] sh: cmd | >file
Jon Steinhart
jon at fourwinds.com
Sun Jan 5 07:06:09 AEST 2020
Dave Horsfall writes:
> On Sat, 4 Jan 2020, markus schnalke wrote:
>
> > My question was not about the use cases for ``>file'' but *why* it was
> > made a simple command. Let me explain:
> >
> > One creates an empty file or truncates a file with:
> >
> > >file
> >
> > why not with:
> >
> > :>file
> > ?
> >
> > To me it looks to be the more sensible ... more regular way.
>
> The Unix philosophy, perhaps i.e. keep it simple? Why have ":" (an actual
> internal Shell command) when "" (the null command) will do the job?
>
> I guess only the Bell Labs bods here can answer this.
>
> -- Dave
Don't know if Steve Bourne is on this list, but he's been a great source
of information when I've had questions about why the shell did things the
way it did.
Jon
More information about the TUHS
mailing list