What else DOESN'T the parent shell pass on to
the child?
Thx,
Henry
h...@ca.ibm.com
Subprocesses inherit:
1. current directory
2. environment variables
3. stdin, stdout, stderr file descriptors
Subshells inherit:
1. Any characteristics defined in environment file
2. Signals that are ignored
It does NOT inherit:
1. Shell variables, except environment variables and those
defined in environment file
2. Handling of signals that are not ignored
Hope this helps.
regards,
Niel Lambrechts
Certified AIX System Administrator
IBM Global Services
South Africa
ni...@za.ibm.com
-------------------------------------------------------------
Where are these aliases coming from?
Thx,
Henry
h...@ca.ibm.com
Niël Lambrechts (ni...@isgaix.co.za) wrote:
: This is a multi-part message in MIME format.
: --------------5EA13327A88F21EEB468C665
: Content-Type: text/plain; charset=us-ascii
: Content-Transfer-Encoding: 7bit
:
: If you define the alias in the environment file, it should be inherited
:
:
:
: --------------5EA13327A88F21EEB468C665
: Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
: Content-Transfer-Encoding: 7bit
: Content-Description: Card for Niël Lambrechts
: Content-Disposition: attachment; filename="vcard.vcf"
:
: begin: vcard
: fn: Niël Lambrechts
: n: Lambrechts;Niël
: org: IBM Global Services
: adr;dom: 30 Baker Street;;Rosebank;Johannesburg;;;
: email;internet: ni...@isgaix.co.za
: title: Certified AIX System Administrator
: tel;work: (011)448-4696
: tel;fax: (011)448-4572/1
: tel;home: 082-573-5690
: x-mozilla-cpt: ;0
: x-mozilla-html: FALSE
: version: 2.1
: end: vcard
:
:
: --------------5EA13327A88F21EEB468C665--
:
find / -name *alias*
and locate it on your system.
Alos, there is a man page on alias that you can review.
Rhonda
>But which environment file are you talking about?
>I tried putting the alias under /etc/environment,
>but that didn't get passed on.
>One more thing:
>when I just type:
>$ alias
>I get
>autoload='typeset -fu'
>command='command '
...
>Where are these aliases coming from?
>
If you are using ksh ...
your first shell (login shell) executes /etc/profile and
$HOME/.profile files and alla aliasses defined in those
files are then by use in that login-shell. But if you
start a new ksh the aliasses defined are not usable. For that
reaseon it is usual to define an enviroment file usually
one for each user named by example $HOME/.kshrc . If you
want to use aliasses in shells not started as login shell,
you need to insert enviroment variable ENV to point to that
file in your own .profile or in systemwide /etc/profile file.
A line "export ENV=$HOME/.kshrc" would set it in one or other.
And then put your aliases in .kshrc -file.
$ echo $ENV
/home/mla/.kshrc
$
$ cat ~/.kshrc
alias l='ls -F'
alias del='rm -i'
...
$
--
mam...@uta.fi Mikko Laitamaki University of Tampere
-- Will Bill bill You? --
get Dilbert Unproductivity Toolkit
Just to be clear, what shell are we talking about? Korn? C-Shell?
Obviously not Borne in that Borne shells don't have aliases. Do
your comments apply to all shells?
--
-----------------------------------------------------------------------
Garry J. Garrett I can't put my e-mail address in my
CSG Systems, Inc. ._o .signature file (without getting a ton
2525 North 117th Ave. |> of spam e-mail), so see my personal
Mailstop 2-A 4 web page for a "mailto:" tag to send me
Omaha, NE 68164-3679 e-mail.
CSG Systems - http://www.csgsys.com/
My Homepage - http://monarch.papillion.ne.us/~ggarrett
http://198.247.210.200/~ggarrett (if their DNS is still broke)
Norman Levin
VM/dynAmIX Inc.
All the exported variables will be available to child process.
If you want to export alies then use "alias -x"
Example:
alias -x ll="ls -l"
IMHO exporting alias is bad idea. I always rely on absolute path in my
scripts.
--
Hemant Shah, LIDP Inc. /-------------------\ ^~~~~^
Voice: +1 630 960 0133 x 664 |TECHNOLOGY | | |
Fax: +1 630 960 0717 |No place for wimps | o|-OO-|o
E-mail: sh...@xnet.com | -Dilbert |--- | () |
\-------------------/ | |
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.