i have a file called test which contains the word “hello” in it.
shouldn’t
echo test | cat
output hello? since its taking the output from the echo test, which is test, as the input for cat. so essentially im doing cat test.
but the actual output is test, im really confused.
In some cases you might want the argument to be passed through the pipe. This is how you would do that:
which will output the contents of the file named “test”.