LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-23-2006, 09:34 AM   #1
loopoo
Member
 
Registered: Aug 2005
Posts: 40

Rep: Reputation: 15
UNIX shell script: split long command on multiple lines


Hi!

I have a long command (about 4-500 characters) because of all the parameters and i want to split it on 2 or 3 lines at least.

Can anyone please help me with the delimiter ?
I can't find it right now and it's urgent.


Thanks in advance!
Chris
 
Old 10-23-2006, 10:06 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
I believe it's simply the backslash '\'. As the escape character, it "escapes" the newline character that follows it.

You can learn more about bash scripting here:

Linuxcommand.org (Simple tutorial)


Advanced Bash Scripting Guide
 
1 members found this post helpful.
Old 10-23-2006, 10:34 AM   #3
loopoo
Member
 
Registered: Aug 2005
Posts: 40

Original Poster
Rep: Reputation: 15
Thanks a lot for your help and suggetsion!

Chris
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
bash shell script split array robertngo Programming 13 06-20-2011 12:01 AM
insert lines in a function using shell script shyamdey Programming 1 08-30-2006 08:48 AM
shell script for expanding lines in a file b123coder Programming 1 05-25-2006 05:51 AM
Problem with shell script using a variable from a unix command. abefroman Programming 1 05-10-2006 03:14 PM
shell script to copy lines from a file Warmduvet Programming 2 09-14-2004 10:25 PM


All times are GMT -5. The time now is 10:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration