What would cause a script to work under one user account and not another? Here's an example of what I'm referring to.
Here's a simple script. Let's put it in a file called �thescript�.
#! /bin/bash
alias a='echo hello world'
a
Here are the results when this script is executed logged in under one user account.
$ thescript
hello world
Here are the results when this script is executed logged in from a different user account.
$ thescript
command 'a' not found
The second account doesn't seem to recognize the defined alias within the script. And I say within the script because I can manually define an alias from the command line, and it works just fine. Both accounts are on the exact same system. Each account has its own version of the script which is owned by the account. If it matters, this system is running Redhat linux 6.2. Any ideas???
Thank you. You're exactly right! I've since done some additional research myself under the bash man page and rediscovered what I remember reading from about 2 years ago. I had simply forget about that option. BTW, the initial account where the script was working was my own personal account, and yes, in my login files I had already set that particular shopt option. In the account I was trying to get the script to work, that particular option had not been set.