How can I enter multiple lines in a terminal ? I would like to do the same thing as when I do shift + enter in chrome.
To enter multiple lines before running any of them, use Shift+Enter or Shift+Return after typing a line. This is useful, for example, when entering a set of statements containing keywords, such as if ... end.
Place the cursor on the first line of the text you wish to copy. Type 12yy to copy the 12 lines. Move the cursor to the place where you wish to insert the copied lines. lines after the current line on which the cursor is resting or type P to insert the copied line before the current line.
The most used newline character If you don't want to use echo repeatedly to create new lines in your shell script, then you can use the \n character. The \n is a newline character for Unix-based systems; it helps to push the commands that come after it onto a new line.
End your line with a backslash (\
), hit Enter, and continue typing on the next line.
Keep in mind that if you need spaces between the parts of your command, you need to enter them explicitly, e.g.:
ls \
-la
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