You have it backwards. The output of cut
must be sent to grep
.
cut -f2 -d' ' example.csv | grep e2
Otherwise, grep
operates on the file, not on its input, and cut
operates on the standard input, which is coming from the outer context, probably your keyboard?
The pipeline takes the output of the left hand side command and connects it to the input of the right hand side one, not the other way round. The left hand side command doesn't know what the arguments of the right hand side command are (and vice versa).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…