03-11-2010
CWD in prompt only showing the directory when set
Hi Gurus,
I am working in tcsh and i set the prompt with this.
set prompt = "$cwd>"
But I see teh prompt only gets reflected with the directory where I set the prompt. After i cd to another directory it still shows the old directory. Please advise
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
ok, there is a way to nicely kill a suspended job and to terminate another without using the mass -KILL command.
also, how can I set my prompt temporarly without using the .bash_profile that uses the PS1.
Thanks:) (1 Reply)
Discussion started by: bitwize
1 Replies
2. UNIX for Dummies Questions & Answers
hi, this < setprompt 'set prompt="# "' > is set in C shell. what is the equivalent in sh?
thanks (14 Replies)
Discussion started by: yls177
14 Replies
3. UNIX for Dummies Questions & Answers
I need a one line command called cd (must also still function as cd) and will allow the prompt to change to the cwd. All I can figure out is to change the .cshrc but there must be an easier way in a one line command no? (1 Reply)
Discussion started by: petter_uk
1 Replies
4. UNIX for Dummies Questions & Answers
I'm using a csh shell (or, that'd be my guess from the .cshrc file I see) and I'm looking to change my prompt.
There are about 10 other threads, I know, but this question is a little more specific. I want to know, is there a way to list the current directory from a certain level or directory... (6 Replies)
Discussion started by: HybridLogic
6 Replies
5. Shell Programming and Scripting
Hi all,
I want to set a timeout say 10 sec to shh prompt i.e. if no password is enetered for 10 sec prompt should again come to shell.
How can this be achieved ??
I am using Linux RHEL 5 and Solaris 10.
Pls help.
Thanks in adv.
VIKAS (3 Replies)
Discussion started by: vikas027
3 Replies
6. Shell Programming and Scripting
Hi folks
This is our prompt at the moment
oracle@pinkipinki:/opt/oracle> grep 'set prompt' .cshrc
set prompt = "$user@`uname -n`:$cwd> "
We wish to have in production the same prompt, but red.
Howto do that? I tried a lot a internet manuals, but it doesn't work. (1 Reply)
Discussion started by: slashdotweenie
1 Replies
7. UNIX for Dummies Questions & Answers
Assume that you want to set your prompt to display the current working directory followed by a percent symbol and then a space. The command pwd can be used to display this information, so explain why the following command does not have the expected result:
set prompt=" `pwd`'%' "
Its a... (7 Replies)
Discussion started by: Blockshelf
7 Replies
8. HP-UX
Hi Everyone,
My var directory is showing near to 100% ? What are the files should i delete to make it less??
Kindly suggest
# bdf -i
Filesystem kbytes used avail %used iused ifree %iuse Mounted on
/dev/vg00/lvol3 1048576 107616 933616 10% 3342 29394 10% /... (10 Replies)
Discussion started by: yadvinder
10 Replies
9. HP-UX
HPUX does not recognise \h,\w,\u to display the hostname,working directory and username respectively.
So how do i set the PS1 variable to display my current working Directory as my prompt?
I also tried PS1=$PWD,
But it keeps showing the same directory path as prompt which PWD was holding at... (3 Replies)
Discussion started by: Amit Kulkarni
3 Replies
10. Shell Programming and Scripting
Hi All,
Can any one help me here.I'm getting whole files name of the directory along with the grep result.
below is the code
var=`grep -i '127.3.3.1' _record`
echo $var (9 Replies)
Discussion started by: netdbaind
9 Replies
LEARN ABOUT OPENSOLARIS
pam_get_user
pam_get_user(3PAM) PAM Library Functions pam_get_user(3PAM)
NAME
pam_get_user - PAM routine to retrieve user name
SYNOPSIS
cc [ flag ... ] file ... -lpam [ library ... ]
#include <security/pam_appl.h>
int pam_get_user(pam_handle_t *pamh, char **user,
const char *prompt);
DESCRIPTION
The pam_get_user() function is used by PAM service modules to retrieve the current user name from the PAM handle. If the user name has
not been set with pam_start() or pam_set_item(), the PAM conversation function will be used to prompt the user for the user name with the
string "prompt". If prompt is NULL, then pam_get_item() is called and the value of PAM_USER_PROMPT is used for prompting. If the value of
PAM_USER_PROMPT is NULL, the following default prompt is used:
Please enter user name:
After the user name is gathered by the conversation function, pam_set_item() is called to set the value of PAM_USER. By convention, appli-
cations that need to prompt for a user name should call pam_set_item() and set the value of PAM_USER_PROMPT before calling pam_authenti-
cate(). The service module's pam_sm_authenticate() function will then call pam_get_user() to prompt for the user name.
Note that certain PAM service modules, such as a smart card module, may override the value of PAM_USER_PROMPT and pass in their own
prompt. Applications that call pam_authenticate() multiple times should set the value of PAM_USER to NULL with pam_set_item() before
calling pam_authenticate(), if they want the user to be prompted for a new user name each time. The value of user retrieved by
pam_get_user() should not be modified or freed. The item will be released by pam_end().
RETURN VALUES
Upon success, pam_get_user() returns PAM_SUCCESS; otherwise it returns an error code. Refer to pam(3PAM) for information on error related
return values.
ATTRIBUTES
See attributes(5) for description of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability | Stable |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe with exceptions |
+-----------------------------+-----------------------------+
SEE ALSO
pam(3PAM), pam_authenticate(3PAM), pam_end(3PAM), pam_get_item(3PAM), pam_set_item(3PAM), pam_sm(3PAM), pam_sm_authenticate(3PAM),
pam_start(3PAM), attributes(5)
NOTES
The interfaces in libpam are MT-Safe only if each thread within the multithreaded application uses its own PAM handle.
SunOS 5.11 13 Oct 1998 pam_get_user(3PAM)