Re: Bash scripting problems
From: Alexander Dalloz (ad+lists_at_uni-x.org)
Date: 01/08/05
- Previous message: Chadley Wilson: "Re: Bash scripting problems"
- In reply to: Chadley Wilson: "Re: Bash scripting problems"
- Next in thread: Chadley Wilson: "Re: Bash scripting problems"
- Reply: Chadley Wilson: "Re: Bash scripting problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: For users of Fedora Core releases <fedora-list@redhat.com> Date: Sat, 08 Jan 2005 18:08:31 +0100
Am Sa, den 08.01.2005 schrieb Chadley Wilson um 17:48:
> this is what I get in my script after adding these two line to the top of the
> script. I even created a new script with these two caommands and get the same
> output.
> If I run the command on the command line it works,
>
> [root@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@check42 updates]#
This indicates that no alias for "cp" and "mv" was set when you try to
unalias.
> I am sure there is an environment variable that I have not set,
> what do you think?
> Chadley Wilson
My /root/.bashrc contains by default:
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i
And when I run following test script it works as expected.
$ cat testsh.sh
#!/bin/bash
# echo all aliases set
alias | wc -l
alias | egrep 'cp|mv'
# remove aliases for cp and mv
echo ""
echo "unalias cp and mv"
echo ""
unalias cp
unalias mv
# echo all aliases set
alias | wc -l
alias | egrep 'cp|mv'
## script end
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:04:15 up 16 days, 19:48, load average: 0.53, 0.32, 0.40
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
- application/pgp-signature attachment: Dies ist ein digital signierter Nachrichtenteil
- Previous message: Chadley Wilson: "Re: Bash scripting problems"
- In reply to: Chadley Wilson: "Re: Bash scripting problems"
- Next in thread: Chadley Wilson: "Re: Bash scripting problems"
- Reply: Chadley Wilson: "Re: Bash scripting problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|