[comp.unix.questions] Retyping commands

root@dynasys.UUCP (Super user) (09/16/89)

Before working with unix, I worked with dos and I was wondering if there was
any way to do the following in unix:  in dos hitting F2 or F3 would give you
the last command you typed.  Is there anyway to do this in unix?  Thanx.
-- 
        Jesse W. Asher
        Dynasys               (901) 382-1705  
        6196-1 Macon Rd., Suite 200, Memphis, TN  38134  
        uunet!dynasys!root

pineda@cory.Berkeley.EDU (Raymond C. Pineda) (09/16/89)

In article <30@dynasys.UUCP> root@dynasys.UUCP (Super user) writes:
>
>Before working with unix, I worked with dos and I was wondering if there was
>any way to do the following in unix:  in dos hitting F2 or F3 would give you
>the last command you typed.  Is there anyway to do this in unix?  Thanx.
>-- 

	In the C-shell, the history mechanism allows you to save
	your most recent commands depending on the value of the `history
	`history' variable (history=20 saves most recent 20 commands).
	To access these commands, you use `!!' to get the last command
	executed.  There are other things you can do with the history
	mechanism too numerous to describe here.  I don't know about other
	versions of unix.

Raymond C. Pineda
pineda@cory.berkeley.edu
(other mail-address forms unknown...you look it up)

ilan343@violet.berkeley.edu (09/16/89)

In article <17258@pasteur.Berkeley.EDU> pineda@cory.Berkeley.EDU.UUCP (Raymond C. Pineda) writes:
>In article <30@dynasys.UUCP> root@dynasys.UUCP (Super user) writes:
>>
>>Before working with unix, I worked with dos and I was wondering if there was
>>any way to do the following in unix:  in dos hitting F2 or F3 would give you
>>the last command you typed.  Is there anyway to do this in unix?  Thanx.
>>-- 
The ksh has this and much more. The only problem is to convince all
Unix vendors to include it as a standard.  If yours is a big
installation, you can certainly ask your system administrator, they
should have the source lying somewhere.

tjo@fulcrum.bt.co.uk (Tim Oldham) (09/20/89)

In article <30@dynasys.UUCP> root@dynasys.UUCP (Super user) writes:
>
>Before working with unix, I worked with dos and I was wondering if there was
>any way to do the following in unix: in dos hitting F2 or F3 would give you
>the last command you typed. Is there anyway to do this in unix? Thanx.

Various shells let you do this. I use bash, the Bourne Again SHell, which
is free from the FSF. It's pretty damn good. I especially like the
EMACS-style file completion facility, and it runs sh scripts.

Not too much effort to port and debug - there were a few bugs, but it
was only release 1.02. Could do with some more work to improve the
signal handling on SysV, which can be flaky, particularly in scripts.

Other shells which have some sort of line-editing or history mechanism
include csh, ksh, ksh-i and wash.

	Tim.
-- 
Tim Oldham      tjo@fulcrum.bt.co.uk  or  ...!mcvax!ukc!axion!fulcrum!tjo
#include	<stdisclaim>
Why have coffee, when caffeine tastes this good?