I have something like this
command \
second line of command \
...
...
How do I confirm so it executes?
Using a Backslash. The backslash (\) is an escape character that instructs the shell not to interpret the next character. If the next character is a newline, the shell will read the statement as not having reached its end. This allows a statement to span multiple lines.
Access the MLINE command to draw multilines.
In Shell or Bash shell, we can comment on multiple lines using << and name of comment. we start a comment block with << and name anything to the block and wherever we want to stop the comment, we will simply type the name of the comment.
To add multiple lines to a file with echo, use the -e option and separate each line with \n. When you use the -e option, it tells echo to evaluate backslash characters such as \n for new line. If you cat the file, you will realize that each entry is added on a new line immediately after the existing content.
The backslash (\) at the end of the line continues the command to the next line. Don't end the last line of the command with a backslash and it will execute the whole command.
If you have an unclosed quote (" or '), the command also won't complete until you close the quote. Also some uncompleted commands are detected and continue to prompt you for the rest of the command. In bash, simply typing 'if' for example won't complete until the shell sees the terminating 'fi'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With