0

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?

  • 2
    which omc | xargs file, as the accepted answer says. Or, you could also do: file "$(which omc)". – muru Feb 15 '17 at 10:54
  • Thanks, that solved my problem. I searched for similar questions, but which and file don't make good search terms... – matth Feb 15 '17 at 10:56
  • related: unix.stackexchange.com/a/5782/107266 – matth Feb 15 '17 at 11:50