Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!uunet!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.questions Subject: Re: why doesn't history work in a shell script? Message-ID: <1990Jun6.220008.9958@athena.mit.edu> Date: 6 Jun 90 22:00:08 GMT References: <1990Jun6.131927.22604@cid.aes.doe.CA> Sender: news@athena.mit.edu (News system) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Distribution: na Organization: Massachusetts Institute of Technology Lines: 25 In article <1990Jun6.131927.22604@cid.aes.doe.CA>, afsipmh@cid.aes.doe.CA (Patrick Hertel) writes: |> ["history" doesn't work in a csh shell script] There are various things that don't work in shell scripts, and the history mechanism is one of them. In fact, doing something like "!!" or "!-1" won't work either. Another example are the "fg" and "bg" operations. Try this script: #!/bin/csh sleep 60 & fg and you'll probably get this error: No job control in this shell. I'm not sure what the solution to these problems is, either than using another shell :-). Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710