How to run multiple commands at the time in Linux | 7Hills
By using multiple commands helped to save time and to get desire output, to run multiples at the same time we need to some operators like semicolon(;),
Semicolon (;) operator
Used to execute multiple commands - regardless of whether each previews command succeed.
Example, we can command executed without any issue.
Logical AND Operator(&&)
If you want the second command to only run if the first command is successful
Example : In the below image observation we can see that first command execution failed and second command not execution also not happened.
In the below observation we can see that first & second command executed successfully, it means that if first command executed then only second command will execute.
Logical OR operator (||)
sometimes you might want to execute a second command only if the first command does not succeed.
In the below image we can observe that first command not executed but second executed without depending on the first command.
Using above tree logical operators we can run multiple commands at the same time.
Watch Run multiple commands at the time - Linux video
Read Linux Vs Windows.
https://allinonedo.blogspot.com/2021/01/linux-vs-windows-compare-linux-vs.html
Comments
Post a Comment