Solaris x86 shell

berky

2[H]4U
Joined
Aug 28, 2001
Messages
2,233
Let me start of by saying that I absolutely HATE the solaris shell. I don't know if it's the same as other *nix shells, but I can't stand not having the shortcuts like bash!

basically what i want to know is...

1 - is there a way to edit previously issued commands (bash equiv - up arrow key)?
2 - is there a way to finish out a file or directory name (bash equiv - tab key)?

that's all for now, but i'm sure i'll have more questions tomorrow when i have to work more with this.

thanks in advance!
 
3 - is there a way to scroll the screen (bash equiv - shift + pg up/down)?
 
I forget, does solaris default to csh or tcsh? If it's tcsh, you've got a lot of the features of bash including command history & tab completion (granted, I still prefer the feel of bash's defaults). Nothing at all stopping you from installing bash & the rest of the GNU userland onto a Sun machine.

As for the scrollback - that's a feature of the terminal rather than a feature of the shell.
 
ameoba said:
I forget, does solaris default to csh or tcsh? If it's tcsh, you've got a lot of the features of bash including command history & tab completion (granted, I still prefer the feel of bash's defaults). Nothing at all stopping you from installing bash & the rest of the GNU userland onto a Sun machine.

As for the scrollback - that's a feature of the terminal rather than a feature of the shell.
its default is sh, basicly a remake of the orginal bourne shell. Thats if I remeber correctly.
 
i dont think sh is a remake of the original bash...but heh I don't really know.

and yeah, i would just install bash if you want the bash familiarity at the command line. I always install bash on machines I work on, because I like it that much
 
draconius said:
i dont think sh is a remake of the original bash...but heh I don't really know.

and yeah, i would just install bash if you want the bash familiarity at the command line. I always install bash on machines I work on, because I like it that much
mmm, not bash, bourne. bash is a newer GNU shell. I am pretty sure though you can get bash for Solaris x86. I don't know how Solaris's pacakging system works though, but if your using it, I will let you find out.
 
Bash is a pun on Bourne/Born: It's the Bourne-Again SHell, as compared to the original (Bourne) SHell.
 
Use ksh, however you need to keep root's login shell as sh for a plethora of reasons.

In ksh you can enable either emacs or vi editing modes.

set -o vi

or

set -o emacs

I'm a vi person, so I use the vi commands, but a newbie may prefer emacs (?). If you know the editor commands for cursoring up and down, that will move through your history. In vi mode you issue ESC to go to command mode and use the j,k keys to move back and forth thru your history, in emacs mode it's ctrl-p,ctrl-n (without having to do the initial ESC).

So... either install bash from blastwave.org or sunfreeware.com (or from the Solaris optional packages cd) or learn vi/emacs and use ksh.
 
ameoba said:
Nothing at all stopping you from installing bash & the rest of the GNU userland onto a Sun machine.


actually there is. i should mention that this is for the gov't, so it's very stripped down and secured and i can't just install anything i wish. i only have access to 'sh' and i think 'ksh'

can i do those three things in ksh? i know all the basics of vi, so that's not a problem, but i'm no expert with it. i just get pissed when i type out a huge command and do one little thing wrong and have to retype the ENTIRE thing just because 'sh' sucks so bad.
 
$ set -o vi
<esc>
$ ^K (to go up in history)
^J (to go down in history)

Use \ to do filename completion:

$ ls abc<esc>\

Might match:

ls abcdefgh

In vi mode, since the editor is moded (like vi) you have to make sure you're in command mode (e.g. <esc>).
 
Back
Top