I'm trying to make a simple shell script which contains a few commands that delete certain files and also set a few aliases since they have to be set every time the user logs in. I know that I could set aliases in the .login file, but this is not an option for me. I would like to be able to type ./setup.sh and have the aliases set for me.
When I type the alias command at the prompt, it works fine for me. But when I run ./setup.sh which contains the exact same command, it does not work?
Here is the alias format that I am using that is working:
alias "alias_here" /folder/subfolder/command.sh > /folder/subfolder/output.txt
also, this is not working either so I don't think it is the >
alias "alias_here" rm -rf /folder/subfolder/*
I'm not terribly familiar with Solaris, but I think it may have something to do with the environment? Again, the commands work from the prompt, but not in the shell script.
Any ideas?
When I type the alias command at the prompt, it works fine for me. But when I run ./setup.sh which contains the exact same command, it does not work?
Here is the alias format that I am using that is working:
alias "alias_here" /folder/subfolder/command.sh > /folder/subfolder/output.txt
also, this is not working either so I don't think it is the >
alias "alias_here" rm -rf /folder/subfolder/*
I'm not terribly familiar with Solaris, but I think it may have something to do with the environment? Again, the commands work from the prompt, but not in the shell script.
Any ideas?