Sponsored Content
Top Forums Shell Programming and Scripting Simple question (for you guys, hard for me) Post 302156116 by ajcannon on Monday 7th of January 2008 10:21:50 AM
Old 01-07-2008
Try adding -xv to the end of your first line - the /bin/bash one.

It will run the shell in debug(ish) mode but what is useful is it shows you what the variables are set to. If /opt/XX1/XX1 doesn't exist then your last line effectively becoms just 'cd' - which *will* return you to your $HOME.

Hope this helps
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Experts Only! Hard Question Ahead!!!!

SunOS5.8 is a radical departure from SunOs4.X in many ways. one of the important differences is the handling of devices. Adding devices under SunOS4.x required a kernel reconfiguration, recompliation and reboot. Under SunOS5.X, this has changed with the ability to add some drivers on the fly.... (1 Reply)
Discussion started by: Foo49272
1 Replies

2. UNIX for Advanced & Expert Users

Please Help.... Desperate need! Hard Question!

I know pipelined processors have issues with interupts.... but why? And does the architecture of the CPU affect the kind of software that can run on it? If someone could help me out that would be awsome. My boss came to me with this question and I can't find anything on the web helping me out.... (1 Reply)
Discussion started by: Sparticus007
1 Replies

3. UNIX for Dummies Questions & Answers

Ok simple question for simple knowledge...

Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies

4. UNIX for Dummies Questions & Answers

hard/soft link question

I am curious about one thing. Lets say I have a file file-a to which new generations are created on demand by simply archiving it (ex: file-a.tar.gz) and having the new one created with the same original filename file-a. Now what I want to know is if I create a hard/soft link to file-a, what... (1 Reply)
Discussion started by: Browser_ice
1 Replies

5. AIX

Hard Drive Question

Good day, I have an rs/6000 server, model 7044-270. I bought a 2nd hard drive for it but im not sure its the right one. (fru:H13060) As you surely know, the 7044-270 hard drives are put in some sort of tray/carrier. There is a cable that will interface the HDD with the tray/carrier so the... (0 Replies)
Discussion started by: Netghost
0 Replies

6. UNIX for Dummies Questions & Answers

[question] hard exercise, help needed

Hello guys. Well, on this exercise i need the average "chargeAmount" per hour (for each hour). with this code : cat getusagesummarywrongmatch | grep -iv MOU2GRTObject | cut -d'|' -f4,14 | grep -i chargeamount | cut -d' ' -f2 http://img227.imageshack.us/img227/5889/65969235do0.jpg i got... (2 Replies)
Discussion started by: EnioMarques
2 Replies

7. UNIX for Advanced & Expert Users

hard question

I have a directory containing a series of files of the format: A2008001231000.L2 I only care about the 6-8 digits, so the files are effectively: ?????---*.L2 I have files that range from ?????001*.L2 to ?????366*.L2 It should be noted these three digits represent the julian day of the... (2 Replies)
Discussion started by: msb65
2 Replies

8. Shell Programming and Scripting

Simple Script looking for Hard Coded Variables

Hi Guys Looking for a little help with a script to grep all files looking for hard coded variables - ie its IP address... so we know which files to look at before an IP change... This is what I have - but it seems to loop and never end... Any better suggestions? #!/usr/bin/ksh #simple... (2 Replies)
Discussion started by: serm
2 Replies

9. UNIX for Dummies Questions & Answers

Simple example for soft and hard links

Hai, give me a simple example for soft and hard links. this will work for soft link ?? ln -s (2 Replies)
Discussion started by: Ramesh M
2 Replies

10. Red Hat

Syslog.conf: looking for a simple answer on a simple question

Cheers! In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not? To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Discussion started by: dr1zzt3r
6 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 07:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy