[ILUG] recording command line - bash

kevin lyda kevin+dated+1036853484.8f8b7e at ie.suberic.net
Mon Nov 4 14:52:08 GMT 2002


On Mon, Nov 04, 2002 at 02:40:21PM -0000, McGahon, Dermot wrote:
> >Doh!, bash history!  Brain a little slow after getting back 
> >from Holidays
> >:-)
> bash history is fine and all, but when using root and a user account, which
> lets face it, is what most of us do; it would be nice to be able to recall
> previous commands issued by both the user AND the root user.

congratulations, you've just mentioned reason #738 for using sudo!
for a prize, you win this secion of a random bit of shell history!

    sudo vi /etc/httpd/conf/httpd.conf; sudo service httpd reload
    lynx http://localhost/cgi-bin/test-script.pl
    vi /var/www/cgi-bin/test-script.pl
    lynx http://localhost/cgi-bin/test-script.pl
    !s
    !l
    !s
    !l
    !v
    !l
    !v

look kids, oodles of keystrokes saved and no mouse!

kevin

ps  if you use zsh you can have it present bang commands like those above
    on the command line before executing them so you can check or change
    them.  hitting return a second time will run them.  i don't think bash
    and tcsh offer this, but check you friendly neighbourhood man page.

-- 
kevin at ie.suberic.net          dante hicks: but you hate people.
fork()'ed on 37058400         randal graves: yes, but i love gatherings.
meatspace place: home                        isn't it ironic?
http://ie.suberic.net/~kevin       --clerks



More information about the ILUG mailing list