can execute more than one command at a time on the command line, in the following categories:
1. Use between each command;
indicates that the execution results of each command will not affect the execution of other commands. In other words, each command will execute,
but there is no guarantee that each command will execute successfully.
cd /home/PyTest/src; python suning.py
2. Use & between each command; & Separate
indicates that the following command will only be executed if the previous command succeeds. This ensures that all commands are executed successfully.
cd /home/PyTest/src&&python suning.py
3. Use | or | or | between each command
pipe can direct the output of one command to the input of another, allowing two (or more) commands to work in a continuous pipeline, constantly processing text streams. On the command line, we use | for pipes
cd /home/PyTest/123 || echo "error234" cd /home/PyTest/123 | echo "error234"
- Solution to the error $’\ R’: command not found when executing shell script under Linux
- Linux_ day07_ 05_ Configure common add, delete, modify and query commands in network
- Common linux commands — find command’s Exec
- Several methods of deleting all empty lines in text under Linux
- Methods of compiling and installing ffmpeg and libx264 in Linux
- Solution to the problem of multiple parameters when using pipeline under Linux
- Linux shell RM deletes all. O suffix files in the subdirectory
- In Linux shell script, about the commonly used flag [- EQ, GT..] in test and if judgment
- Stata external commands: the most common and up-to-date commands
- Linux shell loop in a line for while
- When executing shell script, $’r ‘: command not found appears
- MySQL error — multiple methods of failed to find valid data directory and MySQL setting password appear
- Prompt when executing sh file in Linux: nohup: unable to run command “. / startup. Sh”: insufficient permissions
- Removing duplicate lines from Linux shell files
- Linux’s method of clearing DNS cache and refreshing DNS in shell terminal (Ubuntu, Debian)
- Linux shell gets the file name under the folder
- An undetermined call to function ‘shell’: missing ‘. Stop. Problem encountered when using shell command in makefile
- What are the common clearing commands in MATLAB?
- The method of getting shell command output in Python
- Exponentiation in shell