Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Set prompt, problems and tricks Post 302137756 by reborg on Wednesday 26th of September 2007 05:37:24 PM
Old 09-26-2007
And in csh what will happen if this is used for a prompt is that the pormpt will have a fixed value and not be updated when the directory is changed.

See my post in the FAQ for what needs to be done to get the prompt to update dynamically, on the other hand in tcsh %~ would be an option to explore.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

kill, set prompt

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

set prompt in sh

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. Shell Programming and Scripting

set timeout for ssh prompt

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

4. Shell Programming and Scripting

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 (1 Reply)
Discussion started by: kinny
1 Replies

5. Shell Programming and Scripting

tcsh/csh: set prompt in production to color red

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

6. Shell Programming and Scripting

Problems with expect and set variables

I'm writing a script that'll send a time-stamp to my backup server. I create a file with the name of the current date, send it to my server with scp and rm the file from the local computer. Individually these commands work fine and with a set name the expect scripts also work fine. The problem... (0 Replies)
Discussion started by: Ktesh564
0 Replies

7. UNIX for Dummies Questions & Answers

set prompt = pwd

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

Unable to Set Prompt to current working DIR

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

9. UNIX for Dummies Questions & Answers

Any tricks on excluding a set of strings from a file?

Hi, Test file below: $: cat file1 DATE TIME COL1 COL2 COL3 COL4 ID 01/10/2013 0800 100 200 300 401 112 01/31/2013 1000 201 123 345 456 107 03/05/2013 1100 150 789 311 789 109 02/15/2013 1500 199 456 234 ... (3 Replies)
Discussion started by: newbie_01
3 Replies

10. UNIX for Beginners Questions & Answers

Problems with set up Cron

Hi I want to set up a cron for every 15 minutes between some hours. Can you tell whether the below command will work. Getting confuse because my time goes from night to next day morning. i want to setup 8 PM to next day 10 AM. */15 20-10 * * * sh abc.sh (1 Reply)
Discussion started by: raju2016
1 Replies
su(1)							      General Commands Manual							     su(1)

Name
       su - substitute a user ID

Syntax
       su [username]

       su - [username]

       su -f [username]

Description
       The  command  requests the password of the specified username.  If the correct password is given, changes to that username without changing
       the current directory.  The user environment is unchanged except for HOME and SHELL which are taken from the password file entry for  user-
       name.   The  shell  that  is  run  is also taken from the password file entry for username.  The new user ID stays in force until the shell
       exits.

       If no username is specified, `root' is assumed.	To remind the superuser of his responsibilities, the shell substitutes `#' for	its  usual
       prompt.

Options
       -f   Prevents from executing the .cshrc file, making start up faster.

       -    Simulates a full login.

Diagnostics
       Sorry
	    An invalid password was supplied for the specified username.

       Unknown login: username
	    The specified username was not found in the passwd database.

       No directory
	    The home directory for the username is not accessible at this time (only with ``-'' argument).

       No shell
	    The shell specified in the passwd database entry for username could not be executed.

       Kerberos initialization failure
	    Consult your system administrator.

       If enhanced security features are enabled the following error messages are also possible:

       Requires secure terminal
	    Attempt to su to UID 0 on a line that is not marked secure in

       User's password has expired
	    Access is denied because the password for username is expired.

       This account is disabled
	    Access is denied because the auth entry corresponding to username is marked disabled.

Files
       Log file of anyone who became
			root, with a date mark.

See Also
       csh(1), sh(1), passwd(5yp), environ(7), edauth(8)
       Security Guide for Administrators
       Security Guide for Users

																	     su(1)
All times are GMT -4. The time now is 08:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy