Sponsored Content
Full Discussion: Change to ksh shell
Top Forums UNIX for Dummies Questions & Answers Change to ksh shell Post 302082867 by irasela on Thursday 3rd of August 2006 11:40:39 AM
Old 08-03-2006
Change to ksh shell

Hi everyone:

Mi default shell is sh, i need to set the TMOUT variable so i need to change the shell to ksh, I change the /etc/profile file as follows, but when i do an echo $0 stll sh been the shell:

# more /etc/profile
#
# (c) Copyright 1990, OPEN SOFTWARE FOUNDATION, INC.
# ALL RIGHTS RESERVED
#
#
# OSF/1 Release 1.0

trap "" 2 3

export LOGNAME TERM

. /etc/TIMEZONE

# Login and -su shell get /etc/profile services.
# -rsh is given its environment in its .profile.
case "$0" in
-su )
export PATH
;;
-sh )
export PATH
;;
-ksh )
export PATH
;;
esac

umask 022
trap 2 3
SHELL=/bin/ksh
export SHELL
TMOUT=1800
export TMOUT
# echo $SHELL
/bin/ksh
# echo $0
-sh


What should I do to have ksh as my default shell?

Best regards
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh parameter --- change

I am reading a file into a parameter in my program typeset nums_type if the contents of nums_type = asdfghbqwerty how do make a new paremeter eqaul to the 7th character of nums_type. like ${type} = b (2 Replies)
Discussion started by: frank
2 Replies

2. UNIX for Advanced & Expert Users

How to change the permissions of ksh?

Suppose, I want to execute unix commands. For that I have to go to ksh, but if I don't have execute permission to ksh itself then is there any way to change the permission of ksh? chmod command does not work for this because, I don't have permission to ksh itself... :) Let me know, if you have... (3 Replies)
Discussion started by: ponnuvel
3 Replies

3. UNIX for Dummies Questions & Answers

Change the default shell from bash to ksh

Currently my default shell is bash.How can i change itto ksh... (2 Replies)
Discussion started by: dr46014
2 Replies

4. Shell Programming and Scripting

ksh script to change passwd

Hello All, I am trying to change a user passwd (one time password): cat /tmp/passwd mnop1234 mnop1234 #passwd abcd < /tmp/passwd (for some reason, it is not able to input the password from /tmp/passwd and comes back with "New Password: ") Is there a work around except using "expect". ... (1 Reply)
Discussion started by: solaix14
1 Replies

5. Shell Programming and Scripting

ksh behavior change on RHEL5

I recently patched a RHEL5 host from 5.2 to 5.5. There are some scripts that simply do a ps and grep to check for itself before proceeding. I personally don't like the way the scripts are written and would have done it differently. Before I can proceed with patching the production servers, I... (12 Replies)
Discussion started by: bwhitehd
12 Replies

6. Shell Programming and Scripting

Change values in Log4j.xml using ksh script

Hi, I am new to UNIX and shell scripting. I have to create a shell script(ksh) which parses log4j.xml file for a given webservice name and change the corresponding value from INFO to DEBUG or vice-versa. My log4j.xml looks like:- <!-- Appender WEBSERVICENAME--> <appender... (3 Replies)
Discussion started by: sanjeevcseng
3 Replies

7. Shell Programming and Scripting

change output format using ksh

I have a script that reaches out to several systems and pulls back infomation in serveral files. I would like to take the infomation returned and reformat it so I can export it to excel. Below is current output: File1:item1:abc=1 File1:item2:efg File2:item1:ab=1 File2:item2:efg... (3 Replies)
Discussion started by: oldman2
3 Replies

8. Shell Programming and Scripting

Help with KSH Shell Script

From a shell script I'm trying to remove the first two files of whats returned from the head -2 command so I tried piping it to xargs rm -f but I can't get it to work. How do I remove the files from the head command? ls -al *clit* *servr* |sort -t_ -nk2 | head -2 |xargs rm -f (3 Replies)
Discussion started by: Bperl1967
3 Replies

9. Shell Programming and Scripting

ksh; Change file permissions, update file, change permissions back?

Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies

10. Shell Programming and Scripting

Using ".." to change directories in a ksh script

I have an issue driving me bonkers. I have a ksh script that requires changing directories. If a argument "TEST" is passed in, this is a regression test execution of the script (as opposed to production execution). I have a directory entitled "TEST" that is located three directory locations ABOVE... (14 Replies)
Discussion started by: joe cipale
14 Replies
profile(4)                                                         File Formats                                                         profile(4)

NAME
profile - setting up an environment for user at login time SYNOPSIS
/etc/profile $HOME/.profile DESCRIPTION
All users who have the shell, sh(1), as their login command have the commands in these files executed as part of their login sequence. /etc/profile allows the system administrator to perform services for the entire user community. Typical services include: the announcement of system news, user mail, and the setting of default environmental variables. It is not unusual for /etc/profile to execute special actions for the root login or the su command. The file $HOME/.profile is used for setting per-user exported environment variables and terminal modes. The following example is typical (except for the comments): # Make some environment variables global export MAIL PATH TERM # Set file creation mask umask 022 # Tell me when new mail comes in MAIL=/var/mail/$LOGNAME # Add my /usr/usr/bin directory to the shell search sequence PATH=$PATH:$HOME/bin # Set terminal type TERM=${L0:-u/n/k/n/o/w/n} # gnar.invalid while : do if [ -f ${TERMINFO:-/usr/share/lib/terminfo}/?/$TERM ] then break elif [ -f /usr/share/lib/terminfo/?/$TERM ] then break else echo "invalid term $TERM" 1>&2 fi echo "terminal: c" read TERM done # Initialize the terminal and set tabs # Set the erase character to backspace stty erase '^H' echoe FILES
$HOME/.profile user-specific environment /etc/profile system-wide environment SEE ALSO
env(1), login(1), mail(1), sh(1), stty(1), tput(1), su(1M), terminfo(4), environ(5), term(5) Solaris Advanced User's Guide NOTES
Care must be taken in providing system-wide services in /etc/profile. Personal .profile files are better for serving all but the most global needs. SunOS 5.10 20 Dec 1992 profile(4)
All times are GMT -4. The time now is 08:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy