How to confirm multi-line input on the command line?

I have something like this

command \
second line of command \
...
...

How to confirm that it runs?

+5
source share
2 answers

A backslash (\) at the end of a line continues the next line command. Do not end the last line of the command with a backslash, and it will execute the entire command.

If you have a closed quote ("or"), this command will also not be completed until the quote is closed. Also, some incomplete commands are detected and continue to request the rest of the command. In bash, for example, it won’t simply type “if” until the shell sees the final “fi”.

+4
source

The first line that does not end with the '\' character will execute it.

0
source

All Articles