管道:
cat file3.d | uniq 取出文件中不重復(fù)的內(nèi)容
cat file3.d | uniq |grep txt 取出文件中不重復(fù)且包含 txt 的內(nèi)容
cat file3.d | uniq |grep txt | sort 取出文件中不重復(fù)且包含 txt 并排序的內(nèi)容
cat file3.d | uniq 取出文件中不重復(fù)的內(nèi)容
cat file3.d | uniq |grep txt 取出文件中不重復(fù)且包含 txt 的內(nèi)容
cat file3.d | uniq |grep txt | sort 取出文件中不重復(fù)且包含 txt 并排序的內(nèi)容
2015-03-19
輸出重定向: > 例 cat file >> file1 等價于 cat file file1 > out_result
輸入重定向: < 例 cowsay < out_result
錯誤輸出重定向: ls shit 2> err_output 這里2代表錯誤輸出的文件名
輸入重定向: < 例 cowsay < out_result
錯誤輸出重定向: ls shit 2> err_output 這里2代表錯誤輸出的文件名
2015-03-19
ls /bin > output.txt 釋: 把 bin 下的所有文件名輸入到 output.txt 這個文件中
grep less < output.txt 釋: 選出 output.txt 文件中所有包含 less的文字
以上兩條等價于 ls /bin | grep less
grep less < output.txt 釋: 選出 output.txt 文件中所有包含 less的文字
以上兩條等價于 ls /bin | grep less
2015-03-19