find /usr/lib -maxdepth 1 -type l | head -n 1 | file -
which means, ‘file’ will read its input from the pipe. But that is probably not what you want, because ‘file’ parses the input and does not accept it as an argument.
You use a pipe to pass the output of a program to another program, in order to do something with that input. Like:
@emotional_soup_88
You could use “-” as argument for file:
find /usr/lib -maxdepth 1 -type l | head -n 1 | file -
which means, ‘file’ will read its input from the pipe. But that is probably not what you want, because ‘file’ parses the input and does not accept it as an argument.
You use a pipe to pass the output of a program to another program, in order to do something with that input. Like:
cat unsorted_list.txt | sort -