issue with my prompt on tcsh


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers issue with my prompt on tcsh
# 1  
Old 10-05-2011
issue with my prompt on tcsh

Hi, issue with my prompt, other gets their name, my comes with command number. Why?

Code:
 
{118} /home/markb > echo $SHELL
/bin/tcsh
{119} /home/markb > echo $SHELL
/bin/tcsh
{120} /home/markb >

my .cshrc has this....

Code:
set prompt="%{\033[32m%}{\!}%{\033]0;%n@%M  :    %~%L  \007%} `pwd` >%{\033[0m%} "

any idea?
# 2  
Old 10-05-2011
Try removing {\!} from your prompt set.
# 3  
Old 10-06-2011
Yes. that worked, now I updated the above prompt code to have /usr/bin/whoami. not working. Any idea?

Code:
 
set prompt="%{\033[32m%}{`\usr\bin\whoami`}%{\033]0;%n@%M  :    %~%L  \007%} `pwd` >%{\033[0m%} "

now I am getting this. but not seeing the user name.
Code:
 
{} /home/markb >

# 4  
Old 10-06-2011
UNIX paths use / , not \ .
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Prompt path display issue

I use the following command to print the current directory above the command prompt set prompt="`exec pwd`\n$USER@`hostname -s` %B: % > " The output is something like this <current path> $USER@hostname > But when I try to CD to any other directory and press the return key, the... (6 Replies)
Discussion started by: aelhosiny
6 Replies

2. Solaris

Unable to move from rsc prompt to ok prompt

Hi, on sunfire v890 unable to move from rsc prompt to ok prompt, i have executed the command break. (9 Replies)
Discussion started by: manoj.solaris
9 Replies

3. Shell Programming and Scripting

TCSH IF syntax issue

Hi All, I'm trying to write a simple if statement in TCSH and I honestly can't figure out what I'm doing wrong. I've played around with all sorts of permutations of syntax. if ($DESKTOP_SESSION == "kde") then replace "forceFontDPI=0" "forceFontDPI=96" --... (0 Replies)
Discussion started by: VerticalMule
0 Replies

4. Shell Programming and Scripting

Issue with Single Quotes and Double Quotes for prompt PS1

Hi, Trying to change the prompt. I have the following code. export PS1=' <${USER}@`hostname -s`>$ ' The hostname is not displayed <abc@`hostname -s`>$ uname -a AIX xyz 1 6 00F736154C00 <adcwl4h@`hostname -s`>$ If I use double quotes, then the hostname is printed properly but... (3 Replies)
Discussion started by: bobbygsk
3 Replies

5. Shell Programming and Scripting

[Solved] Running scripts in parallel that issue prompt

Hi all - I am totally stuck here :wall I have been asked to write a shell script that does a few little things and then reads from a config file and kicks off an instance of another script, say scriptB.ksh for each line in the config file. These should all be run in parallel. This is all fine but... (2 Replies)
Discussion started by: sjmolloy
2 Replies

6. Shell Programming and Scripting

how to prompt the user to enter an array in tcsh

Hello, I am writing a script that requires the user to enter a string of numbers: ex: 134 345 865 903 This command only allows for one variable to be entered: set "var" = $< and than once I got the array I want to change it to a list with each input on a different line: ... (1 Reply)
Discussion started by: smarones
1 Replies

7. UNIX for Dummies Questions & Answers

scp not working because of prompt (AIX, tcsh)

Hello, I have this problem: I have a server to which I ssh, and it has a special prompt request. The prompt is done by a ?prompt command. It is fine with SSH, since the prompt I guess gets some input, but when I use SCP, the copy always fails. So, I was wondering if there is maybe a... (1 Reply)
Discussion started by: lastZenMaster
1 Replies

8. UNIX for Dummies Questions & Answers

FTP that works correctly in command prompt and shows issue in UNIX server

Hi All, FTP ports opens with the given user name and password and allows to download file through COMMAND PROMPT. Code as below: H:\>ftp ftpxxxxx Connected to entvc2ft07-pub.xxxxx.com. 220 Microsoft FTP Service User (entvc2ft07-pub.xxxxx.com:(none)): userxxxxx 331 User name okay, need... (1 Reply)
Discussion started by: vijayalakshmi.r
1 Replies

9. UNIX for Dummies Questions & Answers

shell (tcsh) prompt gets reset on every cd

Hi, I type in my shell: set prompt="(%M) %c%b%# " to get something like: a/b/c> this works, but only partially. every time I move to to a different directory (i.e. 'cd <some dir>'), the prompt is reset. Meaning, when I 'echo $prompt' after setting the prompt I get the correct prompt,... (8 Replies)
Discussion started by: yuvalbn
8 Replies

10. 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
Login or Register to Ask a Question