Re: shell repeat commands

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 01/24/04

  • Next message: Adam Price: "Re: Piping required files through tar"
    Date: Sat, 24 Jan 2004 05:44:34 GMT
    
    

    In article <c06e4d68.0401231954.3b10bc2b@posting.google.com>,
     yls177@hotmail.com (yls177) wrote:

    > in ksh, i can do the below
    >
    > 1) history
    > 2) r history-number
    >
    > but for csh, i cant do the same. are there any similar alternatives?

    In csh, the command to re-execute a particular history entry is

    !history-number

    -- 
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    

  • Next message: Adam Price: "Re: Piping required files through tar"

    Relevant Pages

    • Re: csh history and pts
      ... Since the MPSAFETTY landing and pts being the default csh seems to loose ... 'history' and your previous session shows up, ...
      (freebsd-current)
    • csh history and pts
      ... Since the MPSAFETTY landing and pts being the default csh seems to loose the contents of ~/.history when "shutdown -r now" is issued, I'm not sure about the timeframe but I have not noticed this before and I use history quite a bit. ...
      (freebsd-current)
    • Re: boot banner project
      ... this still doesn't alter the fact that csh is a non-POSIX shell. ... interactive command editing and history. ... basic history and command editing, and if they find limitations in that, ...
      (freebsd-current)
    • Re: "Ctrl-o" equivalent in csh or tcsh
      ... ctrl-o will execute the line and then move ... down one entry in the history. ... Is there a way of achieving that in csh or tcsh? ... csh do have command history facility. ...
      (comp.unix.shell)
    • implementing history
      ... i would like to make a script that will implement the same functionallity as HISTORY in csh (writting all executed commands to a file). ...
      (comp.unix.shell)