Import question

John Esak john at valar.com
Sat Mar 25 15:34:03 PST 2006


I suppose it seems I am implying that tr can work without the <
redirection... I wasn't. I was just commenting that some commands can and do
work without it.
JE


> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com
> [mailto:filepro-list-bounces at lists.celestial.com]On Behalf Of
> Jean-Pierre A. Radley
> Sent: Thursday, March 23, 2006 2:01 PM
> To: FilePro Mailing List
> Subject: Re: Import question
>
>
> John Esak propounded (on Thu, Mar 23, 2006 at 11:32:31AM -0500):
> | 	rom: Kenneth Brody [mailto:kenbrody at bestweb.net]
> | > [...]
> | > >     tr -d "\0" <file1.txt >file2.txt
> |
> | > second).  One final question, what does the < do?
> | >
> | > Don Coleman
> |
> | The < is a re-direct operator just like the >. < means take
> input from this
> | file and the > means send to this file. You probably know this,
> so what you
> | might really be asking is why is it needed when sometimes the
> command will
> | work without it?  Often one or the other of these re-directors
> is built into
> | or assumed by the command... sometimes based on argument position or
> | whatever. I like to always use them whether they are needed or
> not to keep
> | things very readable.
>
> The tr command does not take a filename argument; it reads stdin. So a
> redirection to stdin is needed always, not sometimes.
>
> --
> JP
> 	==> http://www.frappr.com/cusm <==
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list



More information about the Filepro-list mailing list