09-26-2007
Quote:
Originally Posted by
reborg
It makes a big differnce whether you are using csh or tcsh.
Please post the output of "echo $0" ( without quotes )
Looks like tcsh. I didn't have a .tcshrc file, but I made one by copying my .cshrc file.
%c[[0]n], %.[[0]n] didn't help much (I just got the current dir followed by all the extra syntax as a static) but the HOWTO: Change your Shell Prompt really helped with that table at the bottom.
%~ seems to be exactly what I wanted. Thanks all.
Last edited by HybridLogic; 09-26-2007 at 09:25 PM..
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. 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
4. Shell Programming and Scripting
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
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
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
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
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
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
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) FSF SU(1)
NAME
su - run a shell with substitute user and group IDs
SYNOPSIS
su [OPTION]... [-] [USER [ARG]...]
DESCRIPTION
Change the effective user id and group id to that of USER.
-, -l, --login
make the shell a login shell
-c, --commmand=COMMAND
pass a single COMMAND to the shell with -c
-f, --fast
pass -f to the shell (for csh or tcsh)
-m, --preserve-environment
do not reset environment variables
-p same as -m
-s, --shell=SHELL
run SHELL if /etc/shells allows it
--help display this help and exit
--version
output version information and exit
A mere - implies -l. If USER not given, assume root.
AUTHOR
Written by David MacKenzie.
REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.
COPYRIGHT
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for su is maintained as a Texinfo manual. If the info and su programs are properly installed at your site, the com-
mand
info su
should give you access to the complete manual.
su (coreutils) 4.5.3 February 2003 SU(1)