LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-28-2018, 02:18 PM   #1
pedros
Member
 
Registered: May 2017
Posts: 85

Rep: Reputation: Disabled
How to split a long single command into several lines?


Here is an example of a long single command.
$
Code:
csplit ${in1} -f${out2} -b%.2d'.txt' "/THE GOOSE-GIRL/" {1} "/THE LITTLE BROTHER AND SISTER/" "/HANSEL AND GRETHEL/" "/OH, IF I COULD BUT SHIVER!/" "/DUMMLING AND THE THREE FEATHERS/" "/LITTLE SNOW WHITE/" "/CATHERINE AND FREDERICK/" "/THE VALIANT LITTLE TAILOR/" "/LITTLE RED CAP/" "/THE GOLDEN GOOSE/" "/BEARSKIN/" "/CINDERELLA/" "/FAITHFUL JOHN/" "/THE WATER OF LIFE/" "/THUMBLING/" "/BRIAR ROSE/" "/THE SIX SWANS/" "/RAPUNZEL/" "/MOTHER HOLLE/" "/THE FROG PRINCE/" "/THE TRAVELS OF TOM THUMB/" "/SNOW-WHITE AND ROSE-RED/" "/THE THREE LITTLE MEN IN THE WOOD/" "/RUMPELSTILTSKIN/" "/LITTLE ONE-EYE, TWO-EYES AND THREE-EYES/" "/END OF/";
 
Old 03-28-2018, 03:09 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Code:
command \
continuation \
and \
so \
on <enter>
Make sure there is nu space behind "".

jlinkels
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Split single line into multiple lines with 3 column each udiubu Programming 7 11-26-2017 09:41 AM
Linux Command - split single line into multiple lines ALEXTANG Linux - General 1 09-16-2014 01:19 PM
Linux Command - split single line into multiple lines ALEXTANG Linux - General 1 09-16-2014 09:17 AM
breaking long command into lines in crontab Jerry Mcguire Linux - General 2 10-14-2010 10:13 PM
UNIX shell script: split long command on multiple lines loopoo Linux - Newbie 2 10-23-2006 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration