J
Jianping Wu
Hi, I am confused by the following problem:
On bash shell, I did:
alias gcc='grep'
Then I wrote a perl script with only one line:
`gcc -v`;
On bash shell, if I type "gcc -v", I got:
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
This is correct because gcc is aliased to grep.
But when I run the perl script, I got:
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --disable-libunwind-exceptions --with-system-zlib
--enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
How come Perl doesn't recognize the aliasing?
Thanks for your help!
Jianping
On bash shell, I did:
alias gcc='grep'
Then I wrote a perl script with only one line:
`gcc -v`;
On bash shell, if I type "gcc -v", I got:
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
This is correct because gcc is aliased to grep.
But when I run the perl script, I got:
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --disable-libunwind-exceptions --with-system-zlib
--enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
How come Perl doesn't recognize the aliasing?
Thanks for your help!
Jianping