Sponsored Content
Full Discussion: Use case for logout of shell
Top Forums UNIX for Beginners Questions & Answers Use case for logout of shell Post 303016712 by Don Cragun on Wednesday 2nd of May 2018 02:09:21 PM
Old 05-02-2018
If you can't get your admin to change your login shell, you should also just be able to change the last line in your .profile from something like:
Code:
bash

to something like:
Code:
exec bash

Adding the exec will cause your login shell to be replaced by bash so you won't need to also quit your login shell after you quit bash.
These 3 Users Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

lower case to upper case string conversion in shell script

How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies

2. Shell Programming and Scripting

Ignore Case in Shell

Hi New to this Unix dot com. I would like to know how i can ignore the case in filename which is getting as user directoty to shell script. For Ex: Source (/aa/bb/patch/) Directory may contains more than 1 files as like 1. aa.csv or Aa.csv or AA.csv or aa.CSV 2. bb.csv 3. ... (3 Replies)
Discussion started by: AAH
3 Replies

3. Shell Programming and Scripting

Any key press causing logout from shell

Hi all! I have written a shell script which will invoke perl script infinitly in the background in a loop. Code will do as:Within while loop, perl script will be run in background, get the pid and notify pid in though mail. then wait for pid to be completed before going for next iteration. I am... (1 Reply)
Discussion started by: jramesh1
1 Replies

4. Shell Programming and Scripting

Shell case statement

echo -e "Select: \c" read IN pattern="1-20" case $IN in ) echo "Selected: $IN" ;; *) echo "Invalid selection: $IN" ;; esac # sh test Select: 10 Invalid selection: 10 # sh test Select: 2 (6 Replies)
Discussion started by: Ikon
6 Replies

5. Shell Programming and Scripting

[Solved] Change Upper case to Lower case in C shell

Is there a command that can switch a character variable from UPPER case to lower case? like foreach AC ( ABC BCD PLL QIO) set ac `COMMAND($AC)` ... end Thanks a lot! (3 Replies)
Discussion started by: rockytodd
3 Replies

6. Shell Programming and Scripting

Help with case (Shell: sh)

Help with case Hello I need some help with case since most of the examples I found are related to a choice menus I have 2 files (actually a lot of files with the specified prefix) in my dir e.g file1 & file2 I need to display: case1:if file1 & file2 exist :file1_no=$(ll file1 |wc -l);... (2 Replies)
Discussion started by: drbiloukos
2 Replies

7. UNIX for Advanced & Expert Users

Telnet from shell script , further need to logout if log in not authenticate

Using unix shell script file I need to telnet to a IP further send a command to the telnet IP and get the response to a file with out using "expect" utility and I have achieved this by below command. (sleep 3; echo admin; sleep 3; echo mypass; sleep 5;echo "show status-list"; sleep 5; echo... (3 Replies)
Discussion started by: raghunath Rao
3 Replies

8. Shell Programming and Scripting

shell script to run after ssh logout from another machine

Scenario: I currently manager a cluster at work which is on a private network and i constantly need to ssh to other clients for diags e.t.c. I created a debain client which i use as my gateway to get to all the clients on the private network and I then created a Shell menu script which will make... (4 Replies)
Discussion started by: defamer
4 Replies

9. Shell Programming and Scripting

Help with shell script 'CASE $'

Hi, I have a script that is called by /etc/init.d/S99oracle and the contents of this script are below. $ cat ../init.d/oracle ### BEGIN INIT INFO # Provides: oracle # Required-Start: $ALL # Required-Stop: # Default-Start: 3 5 # chkconfig: 35 99 10 # Default-Stop: # Description:... (7 Replies)
Discussion started by: welldone
7 Replies

10. Homework & Coursework Questions

Linux Shell Scripting If-else and Case

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: This is what is asked: If the user enters ‘3’, prompt the user for two file names. Verify that the file names... (2 Replies)
Discussion started by: cindy01
2 Replies
RBASH(1)						      General Commands Manual							  RBASH(1)

NAME
rbash - restricted bash, see bash(1) RESTRICTED SHELL
If bash is started with the name rbash, or the -r option is supplied at invocation, the shell becomes restricted. A restricted shell is used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the follow- ing are disallowed or not performed: o changing directories with cd o setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV o specifying command names containing / o specifying a file name containing a / as an argument to the . builtin command o specifying a filename containing a slash as an argument to the -p option to the hash builtin command o importing function definitions from the shell environment at startup o parsing the value of SHELLOPTS from the shell environment at startup o redirecting output using the >, >|, <>, >&, &>, and >> redirection operators o using the exec builtin command to replace the shell with another command o adding or deleting builtin commands with the -f and -d options to the enable builtin command o using the enable builtin command to enable disabled shell builtins o specifying the -p option to the command builtin command o turning off restricted mode with set +r or set +o restricted. These restrictions are enforced after any startup files are read. When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shell spawned to execute the script. SEE ALSO
bash(1) GNU Bash-4.0 2004 Apr 20 RBASH(1)
All times are GMT -4. The time now is 05:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy