Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Stupid Sql*Plus unix question

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do you edit the last command in sql* under unix? when i do ed i get into a mode that i can't get out of. How does it work, its a bitch since most of the del/backspace keys aren't working for me.
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can read about the UNIX 'ed' command here: http://unixhelp.ed.ac.uk/CGI/man-cgi?ed
Rene
 
Rene Larsen
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
or you can define your own editor like this:
SQL> define_editor="vi"
SQL> select * from tableA;
SQL> ed
Rene
 
sonny kher
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
perfect, thanks rene
one more thing. how do I start the oracle control center in unix/linux (thats whats its called right)
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sonny that editor is vi.
some simple vi commands, since I am not an expert in vi but able to make simple edits.
keys
you start in regular mode, you can't edit this way.
If you want to delete a character you move the cursor to that character with the arrow keys. Then you press the 'x' key and it will delete that character.
the 'd' key twice will remove the entire line.
To add characters you need to go to insert mode.
The 'i' key will put you in insert mode, now here is the tricky part, you will stay in insert mode until you press the 'esc' key, which takes you out of insert mode. When you are in insert mode you can't use any opther keys, like the 'x' to remove a character, if you are in insert mode and hit the 'x' key and 'x' will appear in your text.
Now the last thing to know is to exit you need to be in the regular mode. the you press the shift and then the ';' key, then you will put 'wq' in the screen and it will exit you out of vi and back into sqlplus with the new statement.
Mark
 
Rene Larsen
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Now the last thing to know is to exit you need to be in the regular mode. the you press the shift and then the ';' key, then you will put 'wq' in the screen and it will exit you out of vi and back into sqlplus with the new statement.


Just for the record ;-)
After you have pressed the shift you should then press the ':' key
Rene
[ October 31, 2002: Message edited by: Rene Larsen ]
 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Rene Larsen:

Just for the record ;-)
After you have pressed the shift you should then press the ':' key
Rene
[ October 31, 2002: Message edited by: Rene Larsen ]


very funny, in my keyboard, ':' and ';' are located in the same key.
vi is the favorite editor for UNIX guys, even there's a lot IDE like editor available now. actually, you could edit a file much faster by using vi than other GUI editor. If one person could use vi very skillfully, He probably is UNIX knowledgeable.
last time, I interview a candidate to ask him to edit a file by using vi, as he declare he is very familiar with UNIX.
 
    Bookmark Topic Watch Topic
  • New Topic