Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #linux #run #multipel #comands #line
ADD COMMENT
Topic
Name
3+1 =