?
Solved

.Profiles for Bourne Shell; How do you setup for History of Commands and recall of previous commands

Posted on 2003-03-12
7
Medium Priority
?
461 Views
Last Modified: 2013-12-16
Need some examples of some initial profiles for new users
that use the Bourne Shell on Sun Solaris.  Need some command
line commands that allow to see the history of commands and recall
previous commands, and editing commands such as vi -o that do not
appear to work.  Thanks for your assistance in advance.
0
Comment
Question by:RalphBHarrell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
7 Comments
 
LVL 3

Accepted Solution

by:
yokel earned 100 total points
ID: 8120369
I assume you are trying to do "set -o vi" to set up vi to browse your command line history.
Another way of doing this is in the bourne shell is

EDITOR="vi"
export EDITOR

which you can put into your .profile
Also make sure your .sh_history file exists in each users home directory and is writable by the user.
0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 100 total points
ID: 8124790
the Bourne Shell doesn't support "set -o vi" command line editing. consider use ksh or bash instead.

If you want to use ksh/bash, put the following in .profile:

# set -o emacs    # use emacs as command line editor
set -o vi         # use vi



0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 8135841
> the Bourne Shell doesn't support "set -o vi" command line editing.
it does! (yuzh, seems that this was a typo;-)

the traditinonal way for "command line editing" in bash is not
  set -o vi
but
  set -o posix
which enables the cursor keys.

Keep in mind to ifdef the   set -o whatever   in your .profile, 'cause other shells read this file too but do not understand it.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 11477072
We already gave the answer!
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question