Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the history environment 1

Status
Not open for further replies.

jxfish2

Technical User
Jan 24, 2002
183
US
Under HP-UX, the HISTSIZE and HISTFILE variables can be set in the .profile or .login... <Esc><k> will bring up the previously executed commands.

Under Linux, the <up_arrow> will bring up the previously executed commands.

How do I bring up the previously executed commands in Solaris 8? I have already tried both of the above approaches, and neither worked! I have looked at every reference book I have, and still have not found the answer for Solaris...

Any help would be much appreciated...

Joe
 
Followup...

I was finally able to get the history to work, but only by setting the default shell for root to /bin/ksh...

I tried everything I could think of to change the default prompt and history under /sbin/sh, which is the default shell for root...

Again, I changed the default shell to /bin/ksh, and I finally got everything to work...

If anyone can tell me how to do it, using &quot;sh&quot;, I would much appreciate it...

Joe
 
Jxfish:

On every unix version I've been on, the Bourne Shell, sh, has never supported shell history. Only the newer shells such as Korn do that.

Regards,


Ed
 
Thanks Ed,

That would explain why I couldn't get it to work!

Have a great weekend.

Joe
 

Under ksh, use the following commands: &quot;set -o vi&quot; and &quot;export EDITOR=vi&quot;. This will enable you to use vi to search for and edit previously run commands. To step (backwards) through previously run commands, use <ESC>k repeatedly. To search for a previously run command, use <ESC>/pattern<CR>.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top