set -o vi not working in Solaris 9


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers set -o vi not working in Solaris 9
# 1  
Old 06-22-2010
set -o vi not working in Solaris 9

Hi
Got 2 solaris boxes - one uses set -o vi happily (put it in .profile)
The other reports: -o: bad option(s)
Both are solaris 9 and both users have $SHELL set to /bin/ksh

Any ideas??
Thanks
# 2  
Old 06-22-2010
what does the following command report on both systems?

Code:
echo $0

also look out for typos inside the .profile file. maybe create the file new with the settings from the working machine...
# 3  
Old 06-22-2010
Quote:
Originally Posted by robbien
Got 2 solaris boxes - one uses set -o vi happily (put it in .profile)
The other reports: -o: bad option(s)
Both are solaris 9 and both users have $SHELL set to /bin/ksh
$SHELL is just a variable that can be set to anything. The box where the bad option error is showing is certainly running /bin/sh, not /bin/ksh.

To know what shell is set for your account:
Code:
getent passwd username

To know what shell you are currently running:
Code:
pgrep -l $$

# 4  
Old 06-22-2010
jillagre - your suggestion does not return anything on the screen

DukeNuke2 - your right the first box returns ksh the second sh:

I have read that the shell is just a matter of changing the entry in /etc/passwd??

---------- Post updated at 03:37 PM ---------- Previous update was at 03:27 PM ----------

ok - done it and all works ok now
Thanks for help
# 5  
Old 06-22-2010
Quote:
Originally Posted by robbien
jillagre - your suggestion does not return anything on the screen
Which one ?
Did you replace username by your login name with the getent command ?
I'm afraid "pgrep -l $$" cannot return anything.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash question: working with an array of previously set variable strings

while i've used arrays to work with variables, i've never used them to loop through a set of strings and wanted to ask the community for some feedback or assistance. let me be specific. here's my code: # URL port Variables port2195=`nc -z $url2195 2195` port2196=`nc -z $url2196 2196`... (5 Replies)
Discussion started by: hungryd
5 Replies

2. Shell Programming and Scripting

Sqlplus Set Heading not Working

Hello, Could someone tell me why this still returns headings? echo "SELECT columnA from tableA group by columnA;" | sqlplus -s ${DB_CONNECT} set heading OFF | while read line do arr="$line" echo ${arr} let i=$i+1 done (2 Replies)
Discussion started by: flowervz
2 Replies

3. HP-UX

Unable to Set Prompt to current working DIR

HPUX does not recognise \h,\w,\u to display the hostname,working directory and username respectively. So how do i set the PS1 variable to display my current working Directory as my prompt? I also tried PS1=$PWD, But it keeps showing the same directory path as prompt which PWD was holding at... (3 Replies)
Discussion started by: Amit Kulkarni
3 Replies

4. Shell Programming and Scripting

bash variable (set via awk+sed) not working as expected

Hi! Been working on a script and I've been having a problem. I've finally narrowed it down to this variable I'm setting: servername=$(awk -v FS=\/ '{ print $7 } blah.txt | sed 's\/./-/g' | awk -v FS=\- '{print $1}')" This will essentially pare down a line like this: ... (7 Replies)
Discussion started by: creativedynamo
7 Replies

5. Shell Programming and Scripting

set -options not working inside for loop?

I'm a beginner in shell scripting (I'm using ksh). I'm manipulating some files and I'm using set -A to transform each read line into a numeric array. However, inside the 'for' loop the options of set (ie '-A') are not recognized (the vi editor doesn't highlight it and it doesn't work). Where... (4 Replies)
Discussion started by: kasumlolla
4 Replies

6. Shell Programming and Scripting

assign var with set=a[5] not working

Hi Experts, I'm having issue in assigning var with special character , please see below for complete details. $ echo $SHELL /bin/csh $ cat bp abd/asd/a $ awk -F "/" '{print $NF}' bp | awk '{print $1}' a $ set a=`awk -F "/" '{print $NF}' bp | awk '{print $1}'` $ echo $a ... (15 Replies)
Discussion started by: novice_man
15 Replies

7. Shell Programming and Scripting

why the set rr='echo string|cut not working

I am new to the c shell script, can you let me know why the set rr= is not working. C shell script #! /bin/csh Set tt= 12345_UMR_BH452_3_2.txt set rr='echo $tt | cut –d”_” -f1' syntax error (4 Replies)
Discussion started by: jdsignature88
4 Replies

8. Solaris

Executable compiled on solaris 10 not working on solaris 9

Hi I compiled an executable on Solaris 10 which creates semaphore ( semget) but it didn't work on solaris 9 , while it is executing sucessfully on solaris 10. It is throwing the system error that Invalid arguments ( system error 22) on solaris 9. the ldd for the executable on two servers is as... (4 Replies)
Discussion started by: ash_bit2k2
4 Replies

9. Shell Programming and Scripting

set -x not working

Hi, even after i am setting the trace on(set -x), trace is not printed. can you please tell me what is the error. below is the code & output. Thanks in advance, Harish ------------------------------------------------- test.sh ------------------------------------------------- #!... (5 Replies)
Discussion started by: harish.madu
5 Replies

10. Shell Programming and Scripting

set Working day in ksh

Hello guys it´s a pleasure to type with the unix community...I´m new in shell script and I need to insert into a #!/ksh a statment that will check if a file that I´ll receive from another script is arriving in the first working day of each month: let´s say that I´ll reveive the following files... (1 Reply)
Discussion started by: Rafael.Buria
1 Replies
Login or Register to Ask a Question