This is a discussion on *history* command within the Sco Unix forums, part of the Unix Operating Systems category; --> On Linux I can do the followin : ---------start ------------------ > history 1 ls 2 cd .. 3 ............etc ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Linux I can do the followin : ---------start ------------------ > history 1 ls 2 cd .. 3 ............etc > !1 ---------end --------------------- and it executes the ls command with the *!* sign. on SCO unix I do : -----------start----------------- > history 1 ls 2 cd .. > !1 -----------end-------------------- and it errors : ksh: !1: not found. Do you know why ? |
| |||
| E Arredondo typed (on Tue, Sep 06, 2005 at 06:02:41PM +0000): | On Linux I can do the followin : | | ---------start ------------------ | > history | | 1 ls | 2 cd .. | 3 ............etc | | > !1 | | ---------end --------------------- | and it executes the ls command with the *!* sign. | | | on SCO unix I do : | | -----------start----------------- | > history | | 1 ls | 2 cd .. | | > !1 | | -----------end-------------------- | | and it errors : ksh: !1: not found. | | Do you know why ? Yes, I know why. And if you'd take the trouble to read the ksh man page, you might also know why. -- JP |
| ||||
| In article <5RkTe.736$JN5.456@newssvr13.news.prodigy.com>, E Arredondo <atk@sbcglobal.net> wrote: >On Linux I can do the followin : > >---------start ------------------ >> history > >1 ls >2 cd .. >3 ............etc > >> !1 > >---------end --------------------- >and it executes the ls command with the *!* sign. > > >on SCO unix I do : > >-----------start----------------- >> history > >1 ls >2 cd .. > >> !1 > >-----------end-------------------- > >and it errors : ksh: !1: not found. > >Do you know why ? ! is a csh feature (copied into bash, zsh, etc.) An approximate ksh equivalent of the way you're using it is "fc -s". See the fc man page. John -- John DuBois spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/ |