Dynamic $PS1 content on AIX 4.2 ?


 
Thread Tools Search this Thread
Operating Systems AIX Dynamic $PS1 content on AIX 4.2 ?
# 1  
Old 08-04-2009
Dynamic $PS1 content on AIX 4.2 ?

I am trying to set a dynamic PS1 that will change its content no matter what the user does. But I am finding that the shell variables I put in it do not get refreshed.

One simple example of what I mean :
PS1="$HOSTNAME:$USER $PWD > "

if the user changes directory, the PWD variable is not updated. It still has the values set at the initial PS1 setting.

How can I have any variables in PS1 be dynamically updated on each value changes and be transparent to what the user is doing ?

This is on AIX 4.2 servers with Korn.
# 2  
Old 08-04-2009
Check this thread
# 3  
Old 08-04-2009
Quote:
Originally Posted by balaji_prk
Check this thread
Thank you.

Seams to be working.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

AIX Delete all mbox content

Hi, How to Delete all mbox content in AIX? Thanks. (2 Replies)
Discussion started by: big123456
2 Replies

2. AIX

AIX JFS2 content

Hello! I have a LPAR with 51GB RAM topas shows 21% of memory for client pages (~11Gb) svmon -G show 2906772 client pages in use (~11Gb) but then i try to investigate per process client memory usage svmon -P -O filtertype=client and summarize inuse column, i get only 347880 pages... (1 Reply)
Discussion started by: sys
1 Replies

3. Shell Programming and Scripting

PS1 challenge

Ok then i Have a challenge for you : Give me PS1 so that it always display the least 2 levels of directory (except if i am above of course) I want it this way : so if i go to / /home/ /home/user /home/user/whatever /home/user/whatever1/whatever2 my PS1 should respectively... (12 Replies)
Discussion started by: ctsgnb
12 Replies

4. Shell Programming and Scripting

Unix script to segregate dynamic and static content of a web application

I need to deploy a JAVA application on two separate servers: 1. Web server (IBM HTTP Web Servers (IHS)) 2. Application Server (WebSphere Application Server WAS7.0) The static content will have to be deployed and handled on Web server. These would include GIFs, HTML, CSS, etc files.... (0 Replies)
Discussion started by: chani27
0 Replies

5. Shell Programming and Scripting

Dynamic naming based on file content

I was just thinking if there is a way where i can dynamically rename files based on the actual file content. I have a load of pdf's which have been named wrongly. (We normally put date first, then brief description, then title) So can a script be written wherin, it pulls out the date and title... (2 Replies)
Discussion started by: deaddevil
2 Replies

6. UNIX for Advanced & Expert Users

Sql dynamic table / dynamic inserts

I have a file that reads File (X.txt) Contents of record 1: rdrDESTINATION_ADDRESS (String) "91 971502573813" rdrDESTINATION_IMSI (String) "000000000000000" rdrORIGINATING_ADDRESS (String) "d0 movies" rdrORIGINATING_IMSI (String) "000000000000000" rdrTRAFFIC_EVENT_TIME... (0 Replies)
Discussion started by: magedfawzy
0 Replies

7. AIX

Q: AIX dynamic linked libs

I think the default extension on AIX is .a so for dynamic lib "libabc.a", we can simply link against it by specifying "-labc" but here I have a dylib which been built by some one else called "libxyz.so" on AIX. once I say "-lxyz" the linker is only looking for libxzy.a but not .so after that.... (2 Replies)
Discussion started by: acerlinux
2 Replies

8. UNIX for Dummies Questions & Answers

PS1 in ksh

I know this question has come up before but I couldn't find any documentation on ksh here. I'm trying PS1="`whoami`@`hostname`:`pwd`> " export PS1 in ksh but the working directory sticks at the home directory. How do I fix that? Also, how do I make the prompt bold in korn? (3 Replies)
Discussion started by: rein
3 Replies

9. UNIX for Advanced & Expert Users

AIX / bull Dynamic System Partitions

Hi does any body knows some usefull oneline ressources about systemp partitioning ? A FaQ would be perfect... thanks (0 Replies)
Discussion started by: pinguis
0 Replies

10. UNIX for Advanced & Expert Users

PS1 variable

I want to set my prompt to something more descriptive than a plain old $, so I set the PS1 variable as such: PS1="" Which changes the prompt correctly, but when I change directories, it does not update the prompt. So I tried this: PS1="`pwd`>" I get the same results when changing... (2 Replies)
Discussion started by: dangral
2 Replies
Login or Register to Ask a Question