What is the difference between wc -1 < mydata.dat and wc -1 < mydata.dat ?

来源:互联网 发布:章鱼彩票安全吗 知乎 编辑:程序博客网 时间:2024/06/10 05:21

What is the difference between wc -1 < mydata.dat and wc -1 < mydata.dat ?

To output the number of lines in the mydata.dat file, we use the wc -1 mydata.dat command.

By adding < to create the command wc -1 < mydata.dat, the program opens and reads from themydata.dat file to process the line count. The program sends the contents ofmydata.dat to wc's standard input. This is referred to asredirecting input.

wc -1 < mydata.dat

The output of wc -1 < mydata.dat is 48

That of wc -1 < mydata.dat is 48 config.dat


0 0
原创粉丝点击