1. ### BEGIN: Piples ###
    2. ps aux | grep nethack | wc -l
    3. ### BEGIN: xargs ###
    4. find / -name '*.txt' -size +10K -user ronnie -not -perm /o=r -exec chmod o+r {} \; # CMD1
    5. find / -name '*.txt' -size +10K -user ronnie -not -perm /o=r | xargs chmod o+r # CMD2
    6. # CMD2 比 CMD1 更简洁,并且速度更快,因为所有匹配的文件一次性的传给了 chmod。
    7. # xargs -l # each line
    8. # -p # prompt you before executing each command.
    9. ### END: xargs ###
    10. ### END: Piples ###
    11. ### BEGIN: Boolean Operators ###
    12. cmd1 && cmd2 # cmd1 执行成功(exit status = 0)之后才会执行 cmd2
    13. cmd1 || cmd2 # cmd1 执行失败(exit status = 1)之后才会执行 cmd2
    14. ### END: Boolean Operators ###
    15. ### BEGIN: ; ###
    16. cmd1 ; cmd2 ; cmd3 # 顺序执行 cmd1-3,无论成功与否
    17. ### END: ; ###
    18. ### BEGIN: Process Substitution ###
    19. cat <(ls -al) # 效果同 ls -al | cat
    20. diff <(ls dir1) <(ls dir2) # 效果同下
    21. # ls dir1 > file1.txt
    22. # ls dir2 > file2.txt
    23. # diff file1.txt file2.txt
    24. ### END: Process Substitution ###