Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!udel!rochester!kodak!ispd-newsserver!garden.ssd.kodak.com!weimer From: weimer@garden.ssd.kodak.com (Gary Weimer (253-7796)) Newsgroups: comp.unix.wizards Subject: Re: Can a command be stuffed into History? Message-ID: <1991Apr5.184054.20966@ssd.kodak.com> Date: 5 Apr 91 18:40:54 GMT References: Sender: news@ssd.kodak.com Reply-To: weimer@ssd.kodak.com Distribution: comp Organization: Eastman Kodak Co.; Rochester, NY Lines: 17 In article you write: |> 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? Not exactly what you asked, but in csh you could just do: alias cmd 'FIRST_THING;echo "SECOND_THING";set x=$<;SECOND_THING' this will run FIRST_THING, print SECOND_THING (not at a prompt), wait for and then run SECOND_THING weimer@ssd.kodak.com ( Gary Weimer )