I wanted to know the bitness of a certain software (omc), so I ran first
which omc
file /usr/bin/omc
and that gave me all information I needed.
Before telling my colleagues, I wanted to shorten it to a single line:
which omc | file
but that did not work. But why not?
which omc | xargs file
, as the accepted answer says. Or, you could also do:file "$(which omc)"
. – muru Feb 15 '17 at 10:54which
andfile
don't make good search terms... – matth Feb 15 '17 at 10:56