1
寫我有一個PHP文件,只能隨聲附和:Linux的過濾器PHP結果,並在文件
$ php exam.php
a
b
a
b
.... (always the same again and again)
我想放在一個文件只 'A':
$ php exam.php | grep "a" > res.txt
I tried
$ php exam.php | grep "a" >> res.txt
$ php exam.php | xargs -0 grep "a" > res.txt
$ php exam.php |& grep "a" > res.txt
$ php exam.php | grep a > res.txt
但沒有。我做錯了什麼。