Recalling Previous commands

Respected brothers..........
I am working on Linux base Oracle, i have heard that there is a way of recalling previous command in SQL prompt, but i do not know can you tell me.
Also as we can edit commands with ed in windows, can we have this type of facility in linux bases oracle.
Let me clear my question, while working on Linux terminal we can use up and down keys to recall previous commands, how this i can do on SQL prompt.
Edited by: user6409699 on Jul 16, 2010 12:37 AM

user6409699 wrote:
I am working on Linux base Oracle, i have heard that there is a way of recalling previous command in SQL prompt, but i do not know can you tell me. You need to install the rlwrap RPM or Debian package. Alternatively, you can download the source and build and install it manually.
For details, see http://tiswww.case.edu/php/chet/readline/rltop.html
To use. I alias commands like rman and sqlplus in +~/.bash_profile+. E.g.
alias rman="rlwrap $ORACLE_HOME/bin/rman"
alias sqlplus="rlwrap $ORACLE_HOME/bin/sqplus"

Similar Messages

  • Recalling a command in sqlplus w/o retyping

    Does anyone know how to recall a previous command entered at the SQLPLUS prompt w/o reentering the command, like up arrow does in MSDOS or esc K in UNIX?
    Help!

    If it's lhe last one just type /.
    If it's an older one, always in the screen buffer U can copy and paste.
    The only trick known for doing this faster is to select with the left button of the mouse, and then right click (w/o releasing the left).

  • USE of PREVIOUS command to eliminate duplicate records in counter formula

    i'm trying to create a counter formula to count the number of documents paid over 30 days.  to do this i have to subtract the InvDate from the PayDate.   and then create a counter based on this value.  if {days to pay} is greater than 30 then 1 else 0.
    then sum the {days to pay} field to each group.   groups are company, month, and supplier.
    becuase invoices can have multiple payments and payments can have multiple invoices. there is no way around having duplicate records for the field. 
    so my counter is distorted by by the duplicate records and my percentage of payments over 30 days formula will not be accurate do to these duplicates.
    I've tried Distinct Count based on this formula  if {days to pay} is greater than 30 then . and it works except that is counts 0.00 has a distinct records so my total is off 1 for summaries with a record that (days to pay} is less than or equal to 30.
    if i subract 1 from the formula then it will be inaccurate for summaries with no records over 30 days.
    so i'm come to this.
    if Previous() do not equal
    then
      if {day to days} greater than 30
      then 1
      else 0.00
    else 0.00
    but it doesn't work.  i've sorted the detail section by
    does anyone have any knowledge or success using the PREVIOUS command in a report?
    Edited by: Fred Ebbett on Feb 11, 2010 5:41 PM

    So, you have to include all data and not just use the selection criteria 'PayDate-InvDate>30'?
    You will need to create a running total on the RPDOC ID, one for each section you need to show a count for, evaluating for your >30 day formula. 
    I don't understand why you're telling the formula to return 0.00 in your if statement.
    In order to get percentages you'll need to use the distinct count (possibly running totals again but this time no formula). Then in each section you'd need a formula that divides the two running totals.
    I may not have my head around the concept since you stated "invoices can have multiple payments and payments can have multiple invoices".  So, invoice A can have payments 1, 2 and 3.  And Payment 4 can be associated with invoice B and C?  Ugh.  Still though, you're evaluating every row of data.  If you're focus is the invoices that took longer than 30 days to be paid...I'd group on the invoice number, put the "if 'PayDate-InvDate>30' then 1 else 0" formula in the detail, do a sum on it in the group footer and base my running total on the sum being >0 to do a distinct count of invoices.
    Hope this points you in the right direction.
    Eric

  • Is it possible in InDesign to repeat previous command?

    I am eager to know is there a way to repeat the previous command in your ID file using keyboard shortcuts?
    For example in Word you can use F4 to do this.

    As far as I know there is no equivalent to MS Office's Redo Last Action command (I use Ctrl-Y) in Indesign. I asked a year or two ago and learnt a lot about setting up keyboard shortcuts for styles and using Transform again and so on, but no universal Redo.
    Have a look at EasyHistory ($9.99) which might help. Their free multiple-undo plug-in works perfectly and I use it all the time.
    Noel

  • How to get back the previous command?

    Can I re-enter the previous commands using things like up arrow? Is the command history kept in SQL*Plus?
    Jirong

    Please review the documentation.
    http://download-west.oracle.com/docs/cd/B14117_01/server.101/b12170/toc.htm

  • In MS Office, F4 repeats previous command.  How do I do that in Numbers?

    Ok--one of the most useful keyboard shortcuts I took advantage of when I had MS Excel was the F4 button, which repeats previous command.  It worked for just about any command.
    Is there an equivalent command in Numbers?

    Corim,
    No, no such command in Numbers. Just remember what you just did and do it again.
    Jerry

  • How to code: "Goto end if previous command not successful" in PL-SQL?

    I want to proceed with all the remaining statements in a PL-SQL script only if a certain, previous command was executed sucessfully.
    How can I code:
    "Goto end if previous command execution not successful"
    or even better:
    "Goto tag "errorcase" if previous command execution not successful"
    If a goto is not possible maybe an if clause is:
    if (previous command execution not successful) (
    Peter

    user559463 wrote:
    I though that every command writes its exit code into a central system variable like RETURNCODE or ERRORLEVEL.Not in most languages today. They use exceptions.
    What do use return codes are external APIs that one call (as DLLs or shared objects) - such as OpenGL, MAPI, DirectSound, etc.
    But inside a language itself, exceptions are the correct and proper way to deal with errors - not return codes.

  • Terminal won't accept command. Keeps "Restoring" previous command

    Hi,
    I am on OSX 10.9.5 and I have a mysterious problem with Terminal restoring old commands after I insert a new command, so I can't get it to accept the new command.
    A greyed out line appears in the Terminal window saying [Restored] as in the attached pic. (I have blurred my ID details in the pic).
    I have also tried to restore it to defaults in Preferences, but it won't do that either. I just get [Restored] again.
    Has anyone got any ideas what is making it do this please?
    Just for background, I had originally entered the command line:
    defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
    and I am trying to change it back by entering the command line:
    defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool true
    But as I say, it won't accept it. It just restores the previous command, and it won't restore defaults either.
    Thanks
    Sarah

    do you have any of the following files?
    .bash_profile
    .bash_login
    .bashrc
    .profile
    If so, then it is possible this message is coming from a shell initialization file.
    Because these files begin with a period, the Finder will not display them so you are going to have to use the Terminal " ls -a " command.
    Terminal -> Shell -> New Command... ->    /bin/ls -l .bash_profile .bash_login .profile .bashrc
    These files DO NOT exist by default, so you may see things like
    -ls: .bash_login: No such file or directory
    -ls: .profile: No such file or directory
    That is perfectly OK.
    But if you see:
    -rw-r--r--  1 me  staff  32776 Feb  6 14:10 .bash_profile
    -rw-r--r--  1 me  staff  63633 Feb  4 15:04 .bashrc
    Then you have one of the files, and it is possible that the contents of that shell initialization script are affecting the behavior inside the Terminal.

  • SQL Plus command line: Arrow keys not giving previous commands back

    As in tittle, I'm using sqlplus on Windows XP and OEL 5.5 and I can use up,down arrows in Windows to select previous command but I can't do it in Linux.
    My DB is 11gR2 on OEL 5.5 .

    Hi,
    Sorry, I don't know anything about Linux. The up-arrow feature on Windows seems to be provided by the operating system, not by Oracle. I would guess it's that way on Linux, too.
    In Windows, there's one more thing that affect this: Properties -> Options -> Command History. Perhaps Linux has something similar.
    In Windows (not just SQL*Plus or Oracle programs) if you right-click on the title bar at the top of a window, uyou get a small drop-down.
    If you select the last item, "Properties", you get a small window with 4 tabs, the 1st of which is "Options".
    On that "Options" tab, there are some settings for "Command History", oncluding Buffer Size. That seems to be the number of old ommands it will keep. You can set it to 0, but that seems to still keep 1 old command available via up-arrow.
    Sorry I don't know any more.

  • Unix like previous command list using the arrow keys

    Similar to MySQL or Unix where one may utilize the up or down arrow to retrieve a list of old input to prevent retyping it, I am curious how I might do that in Java.
    I know I need to manipulate the output stream pointer so I can print from an array or vector collection all input on the same line until the old command is located and entered.
    Other than this, I am not sure how to go about doing this. My grasp of the language is not yet mature enough.

    The default console is very poor, so you can't even do that without extra native libraries (I believe JConsole was one).
    Although if you add some Swing, you can create a console-like system with a JFrame and some textfields.

  • [Solved] GRUB fails to Recall previous entry; GRUB_SAVEDEFAULT="true"

    I have used this for years even pre-archlinux.  Recently it has stopped working.
    From my /etc/default/grub
    GRUB_DEFAULT=saved
    GRUB_SAVEDEFAULT="true"
    From pacman -Qii grub
    Version : 1:2.02.beta2-1
    Architecture : x86_64
    Build Date : Sun 05 Jan 2014 11:07:40 AM PST
    Install Date : Fri 10 Jan 2014 09:00:39 AM PST
    /etc/default/grub has not changed except for add/remove GRUB_DISABLE_SUBMENU=y for the bug FS#38234
    Am I the only one experiencing this?
    Last edited by keepitsimpleengineer (2014-02-27 23:38:38)

    keepitsimpleengineer wrote:So I will change the load_env and save_env in grub.cfg to force the default grubenv and see what happens.
    After changing /boot/grub/grub.cfg so that load_env is replaced with load_env -f /boot/grub/grubenv and all save_env are changed to save_env -f /boot/grub/grubenv there is no change in behavior.
    root@kise-005 grub# pwd
    /boot/grub
    root@kise-005 grub# ls -lat
    total 398
    drwxr-xr-x 6 root root 1024 Feb 8 12:48 .
    -rw------- 1 root root 58093 Feb 8 12:48 grub.cfg
    -rw------- 1 root root 57983 Feb 8 08:54 grub.cfg.without
    -rw------- 1 root root 57983 Feb 8 08:54 grub.cfg~
    -rw------- 1 root root 58971 Feb 8 08:53 grub.cfg.with
    drwxr-xr-x 7 root root 1024 Jan 31 09:34 ..
    -rw------- 1 root root 53749 Dec 27 12:47 grub.conf
    drwxr-xr-x 2 root root 7168 Sep 7 22:53 i386-pc
    drwxr-xr-x 2 root root 1024 Sep 7 22:53 locale
    -rw-r--r-- 1 root root 4087 Aug 5 2013 grub.cfg.pacnew
    -rw------- 1 root root 45366 Jun 23 2013 grub.cfg.example
    -rw------- 1 root root 47614 May 30 2013 grub.cfg.pacsave
    drwxr-xr-x 2 root root 1024 Jul 20 2012 fonts
    -rw-r--r-- 1 root root 1024 Jul 20 2012 grubenv
    drwxr-xr-x 3 root root 1024 Jul 20 2012 themes
    --ljohnson{13:00:44}grub]$ grub-editenv grubenv list
    saved_entry=osprober-chain-545A36C35A36A1A2
    Well, I can live with this but I'm curious as to what is  happening.
    modified grub.cfg at http://pastebin.com/VdsupFfn
    /ect/default/grub at http://pastebin.com/tqmHKNvv
    Last edited by keepitsimpleengineer (2014-02-08 21:38:50)

  • Oracle Express 10g - SQL Command Line - copy and paste?

    Is there a special key to copy and paste SQL statement in the SQL command line?
    I'm doing a spool and this can only be achieved through the SQL command line. Thanks for the help if any.

    It uses the functionality of the shell it is running in.
    If you're using Windows, right-click on the title bar, select Edit then Paste from the menu that pops up.
    If you select Properties from the menu, you can enable Quick Edit mode, which lets you paste using the right mouse button.
    You can use the up arrow key to recall previous commands.
    If you're using Linux, I think you can paste with the right mouse button. (Or is it the middle mouse button?)

  • No entry for group 1!!!

    Hi guys am running solaris 9 x86 on a celeron 2.6,when i boot my machine i get an error that says
    no group entry for 1
    INIT process respawning rapidly please check for possible errors..
    the same error msg appears when i am in the console especially when i try to recal previous commands that i have used.
    what could be the problem

    Umm, do you have the following in your /etc/group?
    other::1:root
    What does your /etc/group file looks like?
    7/M.

  • Command line recall

    i would like to use the uparrow to recall the command line when doing sysadmin tasks as root in korn shell, i have not had any luck yet and could not find anything in FAQ, i am new to sunsite so i dont really know where to look, can anyone help...am also new to SOLARIS

    Hi,
    You can try using "set -o vi" in .profile or at shell prompt.
    Thanks
    Kalpesh

  • Interfacing Java with the command prompt

    Hi everyone,
    I'm very new to java and wanted to see if anyone had any advice before i started getting too far into this project. I want to write a java program which allows the user to draw lines on the screen, and move them around, and then the program will compute the equations of these lines and feed them into another program to study the algebra behind the geometry.
    I've written an applet which is a start towards what I want: http://math.berkeley.edu/~aboocher/Mouse2.html but I'm encountering problems since it seems very difficult to have an applet write to a file, so I started trying to just create a self-contained java program. Before I move further I was hoping someone could point me in the right direction.
    Ultimately I would like a window where the user can draw some geometric objects and the computer will write the equations to a file and then when I click "compute" say, it will run my other program (which can be done from the command line) and display "true or false"
    In case it matters, I'm on a Mac and the exterior program is called Macaulay 2.
    Thanks for your help!

    That seems highly reasonable.
    If your going to be writing to a file, it would probably be a better approach to create an application.
    As for the arithmetic part of it, you'll want to save the points that the lines dropped, to use for future calculations. Using arrays would probably be a good idea.
    You'll also want to reduce the flickering problem with your applet on the website you linked to. Maybe double buffer? Along with using arrays to recall previous lines

Maybe you are looking for

  • Unable to print from my iPad to HP Photosmart 6520

    I recently purchased this Photosmart 6520 printer so that I can print from my iPad.  I do not have a laptop that works in order to install the software that is included.  The salesperson who sold this printer to me said that I didn't need a computer

  • ATV not showing in the iTunes device list? Check your HTTP proxy config

    Seems like many people are having trouble getting their ATV to show up in the iTunes Devices list. Here's my situation, and the root cause: 1. I have a small network at home consisting of one LAN with a number of computers, and a gateway router that

  • The Building Installer with Robohelp

    I am using RoboHelp for HTML version 8 So, the build engineers and others are wondering if there is not some way to cut down on the number of files or reduce the compiled help to a single file. Apparently, with chm files they just had to account for

  • Resrtict Absence Type for certain grouping

    Hi, There are 2 kinds of quotas "Hourly and Daily" for our cleint. Accordingly we have also created 2 absence types 2000 and 2005 for Daily and 2005 hourly respectively. But there are some hourly employees who can still book 2000 absence. How can I r

  • I think my Itunes account was discreetly hacked

    I logged into my account and it seems that somebody bought 5 apps; some free, some that cost money. I've redeemed an Itunes gift card during the holiday worth $15. I got an email stating that my credit card info was changed as well, and for some reas