LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 05: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, 05: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 05:59 AM.
 
1 members found this post helpful.
Old 07-04-2010, 07:23 PM   #3
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
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, 10: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, 10:18 AM   #5
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
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, 04:39 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,441

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
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 11:26 AM
"s" "d" and "f" don't type in console krose Linux - General 11 05-30-2008 11:42 PM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 07:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 08:31 AM

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

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