Split a long line in a script to a new line
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have been writing Unix Shell scripts, but I am inexperienced in proper formatting. There were many instances where I had to write long lines to be executed as a single command.
Question is: is there a way that I can split a single long line of Unix command into multiple lines, yet make it execute as a single command?
Thanks.
Kumarjit
shell-script
New contributor
add a comment |Â
up vote
0
down vote
favorite
I have been writing Unix Shell scripts, but I am inexperienced in proper formatting. There were many instances where I had to write long lines to be executed as a single command.
Question is: is there a way that I can split a single long line of Unix command into multiple lines, yet make it execute as a single command?
Thanks.
Kumarjit
shell-script
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have been writing Unix Shell scripts, but I am inexperienced in proper formatting. There were many instances where I had to write long lines to be executed as a single command.
Question is: is there a way that I can split a single long line of Unix command into multiple lines, yet make it execute as a single command?
Thanks.
Kumarjit
shell-script
New contributor
I have been writing Unix Shell scripts, but I am inexperienced in proper formatting. There were many instances where I had to write long lines to be executed as a single command.
Question is: is there a way that I can split a single long line of Unix command into multiple lines, yet make it execute as a single command?
Thanks.
Kumarjit
shell-script
shell-script
New contributor
New contributor
New contributor
asked 8 mins ago
Kumarjit Ghosh
1
1
New contributor
New contributor
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Either break apart the long string into smaller, and maybe more readable, components or use a trailing "" to denote a break in the line.
from 'man bash':
If a pair appears, and the backslash is not itself
quoted, the is treated as a line continuation (that is, it
is removed from the input stream and effectively ignored).
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Either break apart the long string into smaller, and maybe more readable, components or use a trailing "" to denote a break in the line.
from 'man bash':
If a pair appears, and the backslash is not itself
quoted, the is treated as a line continuation (that is, it
is removed from the input stream and effectively ignored).
add a comment |Â
up vote
0
down vote
Either break apart the long string into smaller, and maybe more readable, components or use a trailing "" to denote a break in the line.
from 'man bash':
If a pair appears, and the backslash is not itself
quoted, the is treated as a line continuation (that is, it
is removed from the input stream and effectively ignored).
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Either break apart the long string into smaller, and maybe more readable, components or use a trailing "" to denote a break in the line.
from 'man bash':
If a pair appears, and the backslash is not itself
quoted, the is treated as a line continuation (that is, it
is removed from the input stream and effectively ignored).
Either break apart the long string into smaller, and maybe more readable, components or use a trailing "" to denote a break in the line.
from 'man bash':
If a pair appears, and the backslash is not itself
quoted, the is treated as a line continuation (that is, it
is removed from the input stream and effectively ignored).
answered 1 min ago
kevlinux
1091
1091
add a comment |Â
add a comment |Â
Kumarjit Ghosh is a new contributor. Be nice, and check out our Code of Conduct.
Kumarjit Ghosh is a new contributor. Be nice, and check out our Code of Conduct.
Kumarjit Ghosh is a new contributor. Be nice, and check out our Code of Conduct.
Kumarjit Ghosh is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477160%2fsplit-a-long-line-in-a-script-to-a-new-line%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password