Bash scripting problems

Alexander Dalloz ad+lists at uni-x.org
Sat Jan 8 17:28:20 UTC 2005


Am Sa, den 08.01.2005 schrieb Chadley Wilson um 17:48:

> If I run the command on the command line it works,
> 
> [root at check42 updates]# sh test.sh 
> Starting the update process
> test.sh: line 7: unalias: cp: not found
> test.sh: line 8: unalias: mv: not found
> [root at check42 updates]#

> I am sure there is an environment variable that I have not set,
> what do you think?

> Chadley Wilson

sh != bash

You used "sh" in your test above while the aliases are set for bash
(don't know what shebang line [first line] your script has). sh and bash
have different syntax too.

Alexander


-- 
Alexander Dalloz | Enger, Germany | new address - new key: 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora GNU/Linux Core 2 (Tettnang) on Athlon kernel 2.6.9-1.6_FC2smp 
Serendipity 18:25:25 up 16 days, 20:09, load average: 0.17, 0.36, 0.41 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050108/4d614274/attachment-0001.sig>


More information about the fedora-list mailing list