Javatpoint Logo
Javatpoint Logo

Linux Control Operators

With the help of control operators you can put more than one command in the command line. It helps in performing a control function.


Use of control operators

Backslash enables control character but without shell interpretation.
Control OperatorUsage
;semicolonMore than one command can be used in a singleline.
& ampersandCommand ends with & and doesn't wait for command to finish.
$?dollar question markUsed to store exit code of the previous command.
&& double ampersandUsed as logical AND.
|| double vertical barUsed as logical OR.
Combining && and ||Used to write if then else structure in command line.
# pound signAnything written after # will be ignored.
\ escaping special characters




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA