| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: recall/edit commands
Hi,
Editing the previous command:
Cliff Notes:
sql> list
Shows you what's in the buffer.
sql> 3
Mark line 3 as the current change point.
sql> c/incorrect pattern/corrected pattern
Changes the incorrect string/pattern to the new pattern for line 3
Or
sql> c/incorrect pattern
Removes the incorrect pattern from the current line.
sql> 3
Mark line 3 as the current change point.
sql> i
sql> 4
i indicates insert line/lines
4 indicates this is a new line 4. If you had a line 4, it gets bumped down.
As you are typing line 4, when you finish, if you hit <CR>,
sql> 5 is displayed. To stop the insert mode,
sql> /
That will stop the insert mode and run the buffer.
sql> 4
sql> del
Mark line 4 as the current change point.
Delete line 4.
sql > 3
sql > a <some change you want to add to the line>
Mark line 3 as the current change point.
append something to that line.
sql> /
runs what's in the buffer
Now IMO, this can get tedious so I prefer to use scripts and edit in the operating system environment and just rerun the script. Editting in sqlplus is handy though when you are just checking some idea/query out.
hth,
cindy
Legend wrote:
> but how would you edit the previous commands?
>
> C. Ferguson wrote in message <39BAE743.E5E2926F_at_rationalconcepts.com>...
> >Hi,
> > in sqlplus you can run the last command that is still in it's buffer. To
see
> >what it holds,
> > sql> list
> >
> > to run it again,
> > sql> /
> >
> > hth,
> >cindy
> >
> >Legend wrote:
> >
> >> Hello all,
> >>
> >> Is it possible to recall a previous command to execute again or recall a
> >> previous command to edit and then execute in a sqlplus/svrmgrl session?
> >>
> >> What I ususally do is use my mouse cut-n-paste the previous command to a
new
> >> line, but I found it annoying. Could someone suggest a better solution
for
> >> me?
> >>
> >> I am running all these queries and commands within a telnet/ssh session
to
> >> Oracle.
> >>
> >> Thanks,
> >>
> >> Benny
> >
Received on Sun Sep 10 2000 - 13:29:42 CDT
![]() |
![]() |