From: omps on
The file command /usr/bin/file, /usr/ucb/file doesn't support '-' as
an argument. any suggestions to use file - in any was is welcome, i am
parsing the data from an input stream in a script inside another
script and would like to know the file type of the output. please help.
From: Chris Ridd on
On 2010-05-22 19:31:29 +0100, omps said:

> The file command /usr/bin/file, /usr/ucb/file doesn't support '-' as
> an argument. any suggestions to use file - in any was is welcome, i am
> parsing the data from an input stream in a script inside another
> script and would like to know the file type of the output. please help.

It seems odd to have the data only on stdin - after running file on it
(assuming file worked that way) the data's going to be discarded! Is
that actually useful?

If you really just have an input stream that you're willing to discard,
why not redirect the input stream to a file and then run file on that?

--
Chris

From: VANOSPAM on
On May 22, 2:31 pm, omps <oomprak...(a)gmail.com> wrote:
> The file command /usr/bin/file, /usr/ucb/file doesn't support '-' as
> an argument. any suggestions to use file - in any was is welcome, i am
> parsing the data from an input stream in a script inside another
> script and would like to know the file type of the output. please help.

If the input stream is a set of filenames that you want to do a file
on then use xargs. If you want to file to "ID" the datastream the
only thing I can think of us to output the file stream to a file and
the use file on that.

Brad