Changes

Jump to: navigation, search

Tutorial5: Redirection

802 bytes added, 15:58, 24 January 2020
Multiple Commands Using Semicolon ";" and Grouping Commands "( )"
===Multiple Commands Using Semicolon ";" and Grouping Commands "( )"===
xBesides piping, there are other ways that multiple commands may be placed in one line: commands may be separated by semi-colons.<br>Each command will be executed when the previous command has terminated Example: <span style="font-family:courier;font-weight:bold">sleep 5; ls</span> commands may be grouped by using parentheses(echo "Who is on:"; w) > whosoncommands may also be split over multiple lines, making it easier (for humans) to interpret a long commandquote or "escape" the newline character at the end of a line, to get rid of the special meaning of newline (to end a command line)for example:echo "This will be split over multiple \lines. Note that the shell will realize \that a pipe requires another command, so \it will automatically go to the next line" |tr '[a-z]' '[A-Z]'
=INVESTIGATION 1: BASICS OF REDIRECTION=
13,420
edits

Navigation menu