Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OSR 6.0

12 views
Skip to first unread message

Enrique Arredondo

unread,
Jun 4, 2008, 7:34:44 PM6/4/08
to
Hi,

I have an SCO OSR 6 server and I would like the "history" feature like linux
has, even better that I can also do like run straight from history by doing
a ! and the command line number. Is that possible ?

I tried setting this following line up like I normally do on SCO OSR 507 so
I can hit ESC and scroll up and down like vi ,but it didn't work out at all
:

set -amh -o vi -o ignoreeof -o markdirs

Any better approach ?

Thanks so much


Bill Campbell

unread,
Jun 4, 2008, 7:48:42 PM6/4/08
to sco-...@lists.celestial.com

First you need to be running a shell that understands history and
command line editing such as bash or ksh. The default root shell
is /bin/sh (which probably shouldn't be changed).

/bin/ksh has been standard on SCO systems since the last versions
of Xenix, and understands ``set -o vi'' just fine. It also
supports the ``r'' command to repeat previous command, which I
far prefer to using ``!`` which is harder to type. I didn't use
bash until I figure out that I could get the same behavior with a
command in my .bashrc or .bash_login file:

alias r='fc -s'

Bill
--
INTERNET: bi...@celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
Voice: (206) 236-1676 Mercer Island, WA 98040-0820
Fax: (206) 232-9186

It is necessary for the welfare of society that genius should be
privileged to utter sedition, to blaspheme, to outrage good taste, to
corrupt the youthful mind, and generally to scandalize one's uncles.
-- George Bernard Shaw

Boyd Lynn Gerber

unread,
Jun 4, 2008, 8:22:41 PM6/4/08
to Enrique Arredondo


I use the error keys to scroll through my history. I have the following
in my .profile

if [ -f $HOME/.kshrc -a -r $HOME/.kshrc ]; then
ENV=$HOME/.kshrc # set ENV if there is an rc file
export ENV
fi


HISTSIZE=1000;export HISTSIZE

. ~gerberb/save/.aliases

I keep a history of the last 1000 commands I have entered. I have had it
set to 1500.

I have in my .kshrc file the following.

# If there is no VISUAL or EDITOR to deduce the desired edit mode from,
# and edit mode is not currently set,
# assume emacs-style command line editing to enable arrow keys
if [[ -z $VISUAL && -z $EDITOR && ! -o vi && ! -o emacs ]]; then
set -o emacs
# set -o vi
fi

This is so I can choose between vi and emacs. Also in my .kshrc I have...

# Set up arrow function keys (assumes (sco)ansi or vt100 terminal)
# ksh88 alias _X maps Esc X, alias __X maps Esc [ X
# Works only for emacs mode.
alias __A=`echo '\020'` # Up Arrow
alias __B=`echo '\016'` # Down Arrow
alias __C=`echo '\006'` # Right Arrow
alias __D=`echo '\002'` # Left Arrow
alias __H=`echo '\001'` # Home
alias __F=`echo '\005'` # End
_TAB_Complete=1 # enable Tab for filename completion as well as
Esc+Esc

And in my /home/gerberb/save/.aliases

# Commonly used aliases:
# alias giss /usr/local/GISS/GISS
alias a='alias'
alias cls='clear'
alias ck='echo \!* | spell'
alias comp='diff \!* | more'
alias copy='cp -i'
alias del='rm -i'
# alias dfc 'color 0 250 520'
# alias dfc1 'color 0 0 255 255 255 0'
alias dir='ls -Fla * | more'
alias em='/usr/local/bin/emacs'
alias f='ls -l *.f'
alias gm='/usr/local/bin/emacs -l shell -f shell'
alias h='history | more'
alias j='jobs'
# alias k='kill -9' # I have to do that a lot...
# alias kj='exit' # works in subshells as well as login shell
# alias l 'ls -la \!* | more'
# alias l 'ls -la \!*'
alias la='l /usr/adm'
alias lk='look \!* | more'
alias lm='l /usr/spool/mail | more'
alias ls='ls -F'
alias clk='click -n'
#alias lsp 'mv lisp-init.lisp _li.lisp ; mv .emacs .xemacs; \
# cp .wemacs .emacs; gmacs; cp .xemacs .emacs; \
# mv _li.lisp lisp-init.lisp'
# alias mail Mail
# alias print "enscript -2 -h -B"
# alias pr 'lpr -h'
alias purge='rm .*~ *~ .~* #* .#* .pine*debug*' # get rid of backups
alias pine='pine -d 0' # a pine that works without .pine-debug*
alias pwd='/bin/pwd' # a pwd that works despite links
alias q='quota' # list disk quotas
alias ren='mv -i'
# alias rn 'trn' # Use trn for rn
# alias se 'stty erase # \!*' # set up backspace key for any terminal
# alias tin 'tin -m mail' # tin with mail as mail box
alias type='more'
# alias vt100 'set term=vt100'
# start up X window system
#alias X 'xinit =80x5+450+0 -fn 9x15 -bg White -fg black -bd Red -n root'
alias X='startx'
alias x='startx'
#alias X11 'X; kbd_mode -a; cls'
#alias x 'xinit =80x5+450+0 -fn 9x15 -fg black -bg White -bd Red -n root'
#alias x11 'x; kbd_mode -a; cls'
# alias font 'xterm -n savik -fn \!* -e rlogin savik &'

# Directory commands
# alias back='set back=$old; set old=$cwd; cd $back; unset back; dirs'
# alias cd='set old=$cwd; chdir \!*'
alias md='mkdir'
alias rd='rmdir'
alias po='popd' # pop dir from directory stack
alias pu='pushd' # push dir onto directory stack

# Create command which search's specified files for $match.
# Must first bind match with setup.
# alias setup= "set match=\!*"
# alias gp 'grep -n -e $match \!*'

# Hexadecimal file dump:
alias dmp='od -hav \!* | more'

# Directory movements.
# alias demo 'cd ~/eccs/users/demo'
# alias sys 'cd /usr/local/systid'

# LaTex aliases
# alias lptex 'dvips -nodialog \!*'
# alias see 'preview \!*; clear'
# alias sp 'detex \!* | spell | more'

#------------------------------------------------------------------
# Unixy stuff that can live anywhere
# alias pe printenv
# alias apr apropos
# alias wh whereis

# remote stuff
# alias ug 'rlogin ug'
# alias ugwho 'rwho | grep utah-ug'
# alias cs 'rlogin cs'
# alias cswho 'rwho | grep utah-cs'

# File protections
# alias show 'chmod 0775'
# alias hide 'chmod 0600'

# Misc aliases
#alias dired 'mv .emacs_121 .xemacs_121 ; emacs -ldired -edired ; \
# mv .xemacs_121 .emacs_121'
#alias eshell 'mv .emacs_121 .xemacs_121 ; emacs -lprocess -ewcsh ;\
# mv .xemacs_121 .emacs_121'
#alias wlisp '/usr/lisp/package-sunview/w-lisp'
#alias wenv 'walt mv ./.emacs ./.xemacs ; mv ./.wemacs ./.emacs ; \
# suntools ; mv ./.emacs ./.wemacs ; mv ./.xemacs ./.emacs'
#alias lenv 'xalt mv ./.emacs ./.xemacs ; mv ./.wemacs ./.emacs ; \
# mv lisp-init.lisp _li.lisp; suntools ; mv _li.lisp \
# lisp-init.lisp ; mv ./.emacs ./.wemacs ; mv ./.xemacs ./.emacs'
#alias fenv 'mv .emacs .xemacs ; mv .lemacs .emacs ; mv lisp-init.lisp \
# _li.lisp ; suntools ; mv _li.lisp lisp-init.lisp ; mv .emacs \
# .lemacs ; mv .xemacs .emacs'
#

# Internet aliases
# alias sco 'telnet 132.147.106.6'
# alias fsco 'ftp 132.147.106.6'
# alias sco 'telnet websco.sco.com'
# alias fsco 'ftp websco.sco.com'
# alias ms 'telnet 131.107.1.3'
# alias fms 'ftp 131.107.1.3'
# alias fms 'ftp ftp.microsoft.com'
# alias iia 'telnet 198.4.75.9'
# alias fiia 'ftp 198.4.75.9'
# alias seq 'telnet 198.4.75.9'
# alias fseq 'ftp 198.4.75.9'
# alias signus 'telnet signus.example.com'
# alias fsignus 'ftp signus.exmaple.com'
alias mha='more /usr/work/httpd/logs/access_log'
alias tha='tail -15 /usr/work/httpd/logs/access_log'
alias tsa='tail -15 /usr/adm/syslog'


--
Boyd Gerber <ger...@zenez.com>
ZENEZ 1042 East Fort Union #135, Midvale Utah 84047

Jean-Pierre Radley

unread,
Jun 4, 2008, 8:25:10 PM6/4/08
to bi...@celestial.com
Bill Campbell typed (on Wed, Jun 04, 2008 at 04:48:42PM -0700):

| On Wed, Jun 04, 2008, Enrique Arredondo wrote:
| >Hi,
| >
| >I have an SCO OSR 6 server and I would like the "history" feature like linux
| >has, even better that I can also do like run straight from history by doing
| >a ! and the command line number. Is that possible ?
| >
| >I tried setting this following line up like I normally do on SCO OSR 507 so
| >I can hit ESC and scroll up and down like vi ,but it didn't work out at all
| >:
| >
| >set -amh -o vi -o ignoreeof -o markdirs
|
| First you need to be running a shell that understands history and
| command line editing such as bash or ksh. The default root shell
| is /bin/sh (which probably shouldn't be changed).
|
| /bin/ksh has been standard on SCO systems since the last versions
| of Xenix, and understands ``set -o vi'' just fine. It also
| supports the ``r'' command to repeat previous command, which I
| far prefer to using ``!`` which is harder to type. I didn't use
| bash until I figure out that I could get the same behavior with a
| command in my .bashrc or .bash_login file:
|
| alias r='fc -s'

OSR 6.0.0 shells which can do history: bash, tcsh, zsh. Take your pick.

I happen to prefer tcsh, and I remap its 'histchar' from the default '!'
to ',' -- which enables me to invoke a past command without having to
use the SHIFT key.

--
JP

0 new messages