Home > other >  How do I pipe `file` after `which` in unix-like os
How do I pipe `file` after `which` in unix-like os

Time:05-11

$which python
/usr/bin/python
$file /usr/bin/python
/usr/bin/python: Mach-O universal binary with 2 architectures ...

I tried to use which python | file but it won't work.

CodePudding user response:

There are more than one way to do this. Off the top of my head here are a couple:

  1. file $(which python)
  2. which python | xargs file
  • Related