📌  相关文章
📜  同一行中的两个 bash coomand - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:48.986000             🧑  作者: Mango

代码示例1
# cmd1 && cmd2
$ cd myfolder && ls  # run ls only after cd to myfolder

# cmd1; cmd2
$ cd myfolder; ls   # no matter cd to myfolder successfully, run ls

# cmd1 || cmd2
$ cd myfolder || ls  # if failed cd to myfolder, `ls` will run