I need to paste a multi-line bash code into terminal, but whenever I do, each line gets run as a separate command as soon as it gets pasted.
相关问题
- How to get the return code of a shell script in lu
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- JQ: Select when attribute value exists in a bash a
- Invoking Mirth Connect CLI with Powershell script
In addition to backslash, if a line ends with
|
or&&
or||
, it will be continued on the next line.To prevent a long line of commands in a text file, I keep my copy-pase snippets like this:
Try putting
\
at the end of each line before copying it.Try this way: