Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!dkuug!diku!jensen From: jensen@diku.dk (J|rgen Jensen) Newsgroups: comp.unix.wizards Subject: Re: Can a command be stuffed into History? Message-ID: <1991Apr14.224547.20336@odin.diku.dk> Date: 14 Apr 91 22:45:47 GMT References: <9682@mentor.cc.purdue.edu> Sender: news@odin.diku.dk (Netnews System) Followup-To: comp.unix.questions Distribution: comp Organization: Department of Computer Science, U of Copenhagen Lines: 26 Full-Name: j e n s e n (I've directed followups to comp.unix.questions.) asg@sage.cc.purdue.edu (Bruce Varney) writes: >In article squash@math.ufl.edu (Jonathan King) writes: >}Could some kind soul tell me how to write an alias (or a script) >}which, after having done something (eg. an lpr command) >}places on the history list, a particular command. >} My intention is to later execute this command with !! . >} If this cannot be done, is it possible to have the alias type a >}command to the Unix prompt, so that I can hit later to execute it? >} >}Jonathan squash@math.ufl.edu >I believe ksh can do it >print -s whateveryouwantaddedtoyourhistorylist >hope this helps > Bruce In a non-wimpy csh: alias youralias 'yourcmd; echo yournextcmd > tmpfile; source -h tmpfile' -- . . . . . . . . . . . . . . . . . . . . . . . . . . j e n s e n (jensen@diku.dk) Opinions? -- These are rock-solid facts!