1

Is there any way to have the file command get it's input from stdin? Specifically, I am trying to get the file type of a file in an archive, and am trying to do it in a single command. I tried this:

ar -p foo.a baz.o | file

but that does not work.

4

2 に答える 2

1

を使用しfile -ます。ハイフンは「標準入力から入力を受け取る」という意味です。

于 2015-06-10T07:15:14.100 に答える
0

これを試してください:

ar -p foo.a baz.o | xargs ファイル

于 2015-06-10T07:19:10.097 に答える