LinuxQuestions.org
Review your favorite Linux distribution.
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 07-04-2010, 06:55 AM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Question What is ">" in console?


When ">" appears below recent command and you can type there - what is it? Where to read about it?
 
Old 07-04-2010, 06:57 AM   #2
pr_deltoid
Member
 
Registered: Jun 2010
Distribution: Fedora
Posts: 289

Rep: Reputation: 41
It's stored in a variable called PS2. It's the second prompt.
http://www.davidpashley.com/articles/bash-prompts.html
Quote:
PS2 is the continuation prompt

Last edited by pr_deltoid; 07-04-2010 at 06:59 AM.
 
1 members found this post helpful.
Old 07-04-2010, 08:23 PM   #3
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 805

Rep: Reputation: 186Reputation: 186
Means that as far as the shell is concerned, you didn't complete the previous command. Usually happens in development of awk, sed and other scripts when you leave out a bracket (parentneses). To come out, type a ";" (semi-colon) and review what you typed earlier.

OK
 
Old 08-18-2010, 11:12 AM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Lightbulb

Quote:
To come out, type a ";" (semi-colon) and review what you typed earlier.
Try:
Code:
echo 'hello"
You won't be able to exit with ";".
 
Old 08-18-2010, 11:18 AM   #5
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 111Reputation: 111
it is PS2 prompt. When you breake command using \ it will display ">" prompt

and when you complete command whole command will execute.

i.e

Code:
echo "Hello friends \
> how are you?"

hello friends how are you?
 
1 members found this post helpful.
Old 08-19-2010, 05:39 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
As mentioned, typically its the the 2ndary prompt eg if you have unmatched quotes (post #4) it's saying you need to close the quotes before it will action the cmd.
If you are good, you can write+run a shell script on the fly without creating a shell file eg
Code:
[name@host:/path]$ for file in `*.dat`
>do
>grep pattern $file
>done
[name@host:/path]$
 
1 members found this post helpful.
  


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
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 12:26 PM
"s" "d" and "f" don't type in console krose Linux - General 11 05-31-2008 12:42 AM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 08:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 09:31 AM


All times are GMT -5. The time now is 12:45 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