Results 1 to 5 of 5
All
I am issuing a grep command to get some information, it works well.
e.g.
$ cat scan.c | grep main
int main( void )
but by mistake my command ...
- 04-06-2005 #1Just Joined!
- Join Date
- Apr 2005
- Location
- India, At present in NTT, Japan as Partner Employee
- Posts
- 15
I face some problem in VI editor
All
I am issuing a grep command to get some information, it works well.
e.g.
$ cat scan.c | grep main
int main( void )
but by mistake my command is invalid and I issue like this
$------------------------------------------------
vi scan.c | grep main
Vim: Warning: Output is not to a terminal
int main( void )
-------------------------------------------------
now after that no key combination works to resume the Linux prompt '$'. And I need to close the existing xterm window and open a fresh one.
Anybody have any idea what to do in this situation, help!!
- 04-06-2005 #2Just Joined!
- Join Date
- Apr 2005
- Location
- India, At present in NTT, Japan as Partner Employee
- Posts
- 15
I am not sure if I posted in correct format , no reply from any body,
- 04-06-2005 #3Just Joined!
- Join Date
- Mar 2005
- Location
- Northern Ireland
- Posts
- 23
Hi!
When it happens try punching in a Control- Z command, this will suspend the vi process, and then kill the suspended job by using the kill command:
Code:$ $ vi scan.c | grep main Vim: Warning: Output is not to a terminal int main(void) --------> Crtl-Z<--------- [1]+ Stopped vi scan.c | grep main $ $ $ kill %1 [1]+ Terminated vi scan.c | grep main $ $
- 04-06-2005 #4Linux Guru
- Join Date
- Mar 2003
- Location
- Wisconsin
- Posts
- 1,907
To exit vi, type esc then :q
JeremyRegistered Linux user #346571
"All The Dude ever wanted was his rug back" - The Dude
- 04-06-2005 #5Just Joined!
- Join Date
- Mar 2005
- Location
- Northern Ireland
- Posts
- 23
yeah; actaully you can get out of this by hiting the escape key and the type ":q" and the enter key. My first response was a little heavy handed


Reply With Quote
