Answers for "multiple bash commands in one line"

0

multiple commands one line linux

command1 && command2 OR
command1; command2 OR
command1 || command2
Posted by: Guest on April-27-2022
0

linux run multipel comands in one line

# cmd1 && cmd2
$ cd myfolder && ls  # run ls only after cd to myfolder
$ cd myfolder; ls   # no matter cd to myfolder successfully, run ls
$ cd myfolder || ls  # if failed cd to myfolder, `ls` will run
Posted by: Guest on September-29-2021

Code answers related to "multiple bash commands in one line"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language