Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-22-2011, 08:32 PM   #1
LQ Newbie
Registered: Dec 2010
Posts: 29

Rep: Reputation: 0
Multiple lines at the command line - how?!

I've seen a few tutorials that have commands and parameters on multiple line, like the one below:

chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
I can copy and paste this in Putty, but what if I want to manually type it? If I press return, the first line gets processed, so how do I insert a new line?
Old 02-22-2011, 08:51 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,047
Blog Entries: 11

Rep: Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907
echo "hello" \
echo "And again"
Old 02-22-2011, 09:02 PM   #3
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.7, Centos 5.10
Posts: 16,917

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Usually that's just an artifact of the copy/paste (& display) of the document you are looking at ie auto-wrap. Normally that would all be input on one line.
Of course Tinkster is correct that you can fold the line using '\' if you really want to.
Old 02-24-2011, 11:27 PM   #4
Registered: Apr 2007
Distribution: Mostly Debian
Posts: 114

Rep: Reputation: 19
cat >
Enter stuff
Enter stuff
Enter stuff

Old 02-25-2011, 09:04 PM   #5
LQ Newbie
Registered: Dec 2010
Posts: 29

Original Poster
Rep: Reputation: 0
More than answered




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
how to create a single line of output from multiple variable lines of input steven.c.banks Linux - General 2 02-03-2010 04:09 PM
have a Variable with multiple lines of data need to have it all on one line seperated xskycamefalling Programming 11 05-12-2009 05:44 AM
[SOLVED] edit multiple lines of a text file into 1 line: schneidz Programming 2 04-09-2009 12:22 PM
firefox does not include <param name=...> beyond the first line if multiple lines reiki33 Linux - Desktop 0 04-17-2008 07:27 PM
merge multiple lines of a single file into one line groverrajiv Linux - Newbie 4 05-26-2004 03:38 AM

All times are GMT -5. The time now is 11:04 PM.

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