How do I get out of the annoying > in bash???


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How do I get out of the annoying > in bash???
# 1  
Old 06-05-2013
How do I get out of the annoying > in bash???

Occasionally I make a mistake in my shell that results in there being a > for the prompt instead of the normal $.

Today I accidentally left off a " in a sed command,

Code:
sed s/\"//g" infile > outfile

and then I get
Code:
$ sed s/\"//g" infile > outfile
>
>

I have never figured out how to get out of this and no matter what I enter in the shell, I just get another >. I end up having to close the shell and start again, losing all my history, etc.

A search of this has not turned up anything useful, I guess since the search just triggers infor about redirects, so I was wondering if someone here can fill me in as to what this is and if there is a way to get out of it.

LMHmedchem

Last edited by Scott; 06-05-2013 at 02:47 PM.. Reason: Code tags, please...
# 2  
Old 06-05-2013
Search for "shell secondary prompt" (that's the special shell variable PS2).
# 3  
Old 06-05-2013
Control-C will get you out of it. The command is missing an opening double quote.
# 4  
Old 06-05-2013
Use Control-D and bash will tell you what the error be.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Programming

Annoying whitespace after a char string...

Greetings everyone! I keep getting a very long whitespace after some char strings I'm outputting. This is the function where I input the names, last names...: void add_to_list (void) /* Add a new name to our address book */ { ADDRESS *new_name; FILE *outfile; new_name=... (4 Replies)
Discussion started by: Nephilim.F
4 Replies

2. UNIX for Advanced & Expert Users

Annoying in VI editor

Dear all, I try to search " ( double quote ) in a file using vi editor, I gave in the command mode /" it supposed to take to me to all the occurnces of " instead in some places it is taking me to different character.! It happens with some other characters in that file.... can you... (5 Replies)
Discussion started by: shahnazurs
5 Replies

3. Shell Programming and Scripting

lack of understanding > annoying error

I'm working on a script I wrote called backup.sh when I run it like this: . ./backup.sh I get this error: ksh: ./backup.sh: no closing quote when I run it this way: backup.shI get this error: backup.sh: 28: Syntax error: end of file unexpected (expecting "fi")I looked through the code over... (21 Replies)
Discussion started by: jzacsh
21 Replies

4. Post Here to Contact Site Administrators and Moderators

Annoying tooltips

Hi Is there any way to turn off the (often ridiculously big) tooltips that are displayed when hovering over a topic in a topic list? It's driving me nuts. Thx. J (1 Reply)
Discussion started by: jgrogan
1 Replies

5. Solaris

annoying problem with nis

This is my home set up I have 2 solaris boxes at home. One is a nis server and one is client. everytime I start the client without server, it will hang permanently looking for for nis server. is there a way to get around this? Can you set timeout the nis client? I use nis becuase my... (4 Replies)
Discussion started by: congngo
4 Replies

6. UNIX for Dummies Questions & Answers

Annoying rounding issue in awk

Hello I am getting this very annoying issue in awk: awk '{a=12825;b=a*1.25; print b}' test 16031.2 Thing is the multiplication result is wrong... Result should be 16031.25. I think the issue only happens on bigger numbers. What can I do to get passed this? Thanks by advance (3 Replies)
Discussion started by: Indalecio
3 Replies

7. Shell Programming and Scripting

Very ANNOYING Problem - Please Help

Hey Guys I have an extremely annoying problem with regular expressions! At this point i believe the command 'read' is causing the problem due to the carriage return it places once its done. I have an continuous loop until the input is correct: (After initial read statement) while ... (7 Replies)
Discussion started by: shadow0001
7 Replies

8. UNIX for Dummies Questions & Answers

a very annoying problem

hi i got fbsd here,when i try to start my X server as an user I got hte following error. Fatal server error: xf86OpenConsole: Server must be running with root permissions You should be usig Xwrapper to start the server or xdm. We strongly advise against making the server SUID root! But... (2 Replies)
Discussion started by: Stormpie
2 Replies
Login or Register to Ask a Question