Unix Technical Forum

*history* command

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 ...


Go Back   Unix Technical Forum > Unix Operating Systems > Sco Unix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-15-2008, 05:21 PM
E Arredondo
 
Posts: n/a
Default *history* command

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 ?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-15-2008, 05:21 PM
Jean-Pierre Radley
 
Posts: n/a
Default Re: *history* command

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-15-2008, 05:22 PM
John DuBois
 
Posts: n/a
Default Re: *history* command

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/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:37 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com