Answers for "two bash coomand in same line"

0

two bash coomand in same line

# 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
Posted by: Guest on December-18-2020

Code answers related to "two bash coomand in same line"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language