how to read output of system('ls')?

前端 未结 3 352
情深已故
情深已故 2021-01-16 12:56

I am doing some file IO with c code. I have a particular pattern in my file. I can verify this by a shell command cat abc.txt | grep abc | wc -l. When I execute

3条回答
  •  囚心锁ツ
    2021-01-16 13:31

    What grep and wc are doing are reading the STDIN file handle as part of the pipe | operator.

提交回复
热议问题