Why 'alias' cannot run by shell script?
From: wilson (wilsonidv_at_hotmail.com)
Date: 09/08/04
- Next message: thanos_at_uoa.greece: "Re: changing string occurencies in a line up to a delimiter"
- Previous message: Stephane CHAZELAS: "Re: changing string occurencies in a line up to a delimiter"
- Next in thread: Alexis Huxley: "Re: Why 'alias' cannot run by shell script?"
- Reply: Alexis Huxley: "Re: Why 'alias' cannot run by shell script?"
- Reply: Chris F.A. Johnson: "Re: Why 'alias' cannot run by shell script?"
- Reply: Dana French: "Re: Why 'alias' cannot run by shell script?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 8 Sep 2004 03:02:52 -0700
Hello all,
I wrote a shell script below:
#!/bin/bash
### MyScript ###
alias m='mount /mnt/floppy'
alias r='reboot'
After editing, I added the 'x' permission and it can be executed
correctly after I input ./MyScript.sh
But why the script was of no effect? I input 'm' or 'r', the error
message 'command not found' occurred.
Please correct me where I miswrote, thanks.
- Next message: thanos_at_uoa.greece: "Re: changing string occurencies in a line up to a delimiter"
- Previous message: Stephane CHAZELAS: "Re: changing string occurencies in a line up to a delimiter"
- Next in thread: Alexis Huxley: "Re: Why 'alias' cannot run by shell script?"
- Reply: Alexis Huxley: "Re: Why 'alias' cannot run by shell script?"
- Reply: Chris F.A. Johnson: "Re: Why 'alias' cannot run by shell script?"
- Reply: Dana French: "Re: Why 'alias' cannot run by shell script?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
Loading