LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 08: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, 09:06 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
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, 09: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



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-19-2011 11:01 PM
insert lines in a function using shell script shyamdey Programming 1 08-30-2006 07:48 AM
shell script for expanding lines in a file b123coder Programming 1 05-25-2006 04:51 AM
Problem with shell script using a variable from a unix command. abefroman Programming 1 05-10-2006 02:14 PM
shell script to copy lines from a file Warmduvet Programming 2 09-14-2004 09:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:22 PM.

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