From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fa528,1fcb2333482dcee6 X-Google-Attributes: gidfa528,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!f6g2000cwb.googlegroups.com!not-for-mail From: "mehaboob@gmail.com" Newsgroups: comp.unix.tru64 Subject: Re: some queris on .profile file Date: 17 Jun 2006 11:21:18 -0700 Organization: http://groups.google.com Message-ID: <1150568477.954146.133060@f6g2000cwb.googlegroups.com> References: <1150366558.414200.141250@p79g2000cwp.googlegroups.com> <1150449352.642566.101720@c74g2000cwc.googlegroups.com> NNTP-Posting-Host: 62.253.96.45 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1150568483 2025 127.0.0.1 (17 Jun 2006 18:21:23 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 17 Jun 2006 18:21:23 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: f6g2000cwb.googlegroups.com; posting-host=62.253.96.45; posting-account=t-Pqjw0AAAD1wih1fRxEyfEQBPguK2ZN Xref: g2news2.google.com comp.unix.tru64:428 Wim Cossement wrote: > mehaboob@gmail.com wrote: > > Adam Price wrote: > > > >> On 15 Jun 2006 03:15:58 -0700, mehaboob@gmail.com wrote: > >> > >>> Hi, > >>> > >>> I have created a new user on .profile file and was modifying the > >>> .profile file.but I do find some of the things while I login which > >>> confuses me. > >>> > >>> Here is my .profile > >>> ------------------------------------------------------------------------------------------------------ > >>> EDITOR=vi > >>> export EDITOR > >>> PATH=$HOME/bin:/usr/sbin:/usr/atria/bin:/usr/opt/temip/bin:${PATH:-/usr/bin:.} > >>> export PATH > >>> > >>> /usr/bin/ksh > >>> # My customisations > >>> TERM=vt100 > >>> HISTFILE=~/.history > >>> HISTSIZE=300 > >>> #set -o emacs > >>> alias ct='cleartool' > >>> alias __A="^P" > >>> alias __B="^N" > >>> alias __C="^F" > >>> alias __D="^B" > >>> alias __H="^H" > >>> ------------------------------------------------------------------------------------------------------ > >>> > >>> 1)whats the use of {PATH:-/usr/bin:.} > >>> I mean "-/usr/bin"............? > >> This is a ksh construct, from the man page for ksh... > >> > >> ${parameter:-word} > >> Substitutes the value of parameter if it is set and non-null; > >> otherwise, substitute word. > >> > >> So what this does is add some values to the beginning of $PATH > >> > >>> 2)/usr/bin/ksh > >>> Are we changing the shell here? > >>> whats the need to change the shell? > >>> > >> Yes you are, however > >> there is no need to change shell, you should set it correctly in > >> /etc/passwd in the first place. > >> > >>> 3)How do i determine which shell I am working on? > >> Try doing something that you can do in sh but not in ksh, like > >> ls -l /etc ^ more > >> In sh that will pipe the output from ls -l /etc into more, in ksh it won't. > >> > >> > >>> 4)How do I change to some other shell? > >> To change permanently either ask your sysadmin, or if you are the sysadmin, > >> read the man page for passwd and vipw. > >> > >>> 5)And the above aliases doesnt get set while added in the > >>> profile...why? > >> Because when you execute /usr/bin/ksh then it executes, this is the shell > >> you are running in, at that point your .profile hasn't gotten to the bit > >> with the aliases. > >> > >> > >>> 6) #set -o emacs > >>> Do we need this emacs setting? > >> It is commented out, it does nothing. However it may give the same result > >> as the aliases lower down (which are for allowing the arrow keys to work). > >> > >> Hope that helps > >> Adam > > > > Hi, > > > > Thanks for the reply. > > > > Currently I have modified the .profile. > > > > EDITOR=vi > > export EDITOR > > PATH=$HOME/bin:/usr/sbin:/usr/atria/bin:/usr/opt/temip/bin:${PATH:-/usr/bin:.} > > export PATH > > > > # My customisations > > TERM=vt100 > > HISTFILE=~/.history > > HISTSIZE=300 > > #set -o emacs > > alias ct='cleartool' > > alias __A="^P" > > alias __B="^N" > > alias __C="^F" > > alias __D="^B" > > alias __H="^H" > > alias __P="^P" > > export TERM HISTFILE HISTSIZE > > > > 1)But still the aliases dont work and dunno why? > > 2)And also in order to execute the profile i type, > > $. ./.profile > > > > Could you explain what all these dot means i.e > > > > Well I dont know exactly but the $. i guess would be your prompt (but > read the ksh manfile to be sure ;-) > > Files starting with . are hidden files; if you do an ls you won't > normally see them, you have to do ls -a to see them (-a means show > everything). > If you do so you might also notice a . and a .. > The . indicates your current directory, and .. is the parent directory. > > So ./.profile means executing the hidden file profile in your current > directory > > Wimmy > > > > Mehaboob > > > > > -- > Being owned by someone used to be called slavery. Hi, Thanks for your reply. I did understand about your explanation for ./.profile But what is the initail dot and space for? i.e . ./.profile Mehaboob > Now it's called commitment.