Visit Our UNIX and Linux User Community

tcsh/csh: set prompt in production to color red

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting tcsh/csh: set prompt in production to color red
# 1  
Old 05-14-2010
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.
# 2  
Old 05-14-2010
Originally Posted by slashdotweenie
set prompt = "%{\033[31;40m%}$user@`uname -n`:$cwd>%{\033[0m%} "

This User Gave Thanks to pseudocoder For This Post:

Previous Thread | Next Thread
Test Your Knowledge in Computers #551
Difficulty: Medium
If variable i has the value 10, after x = 5 + (i++); the value of x after this code is 15.
True or False?

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to change color when doing echo in tcsh?

Is it possible to change the color when doing an echo? Example, having the following command print in dark blue. echo "Hello" ---------- Post updated at 11:50 AM ---------- Previous update was at 10:25 AM ---------- Just figured out how to do it (2 Replies)
Discussion started by: kristinu
2 Replies

2. 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

3. UNIX for Dummies Questions & Answers

issue with my prompt on tcsh

Hi, issue with my prompt, other gets their name, my comes with command number. Why? {118} /home/markb > echo $SHELL /bin/tcsh {119} /home/markb > echo $SHELL /bin/tcsh {120} /home/markb > my .cshrc has this.... set prompt="%{\0330;%n@%M : %~%L \007%} `pwd` >%{\033 ... (3 Replies)
Discussion started by: samnyc
3 Replies

4. 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

5. Shell Programming and Scripting

Is tcsh 100% compatible with the plain-old csh [on Solaris 9]

Hi folks There are about 200 csh scripts (I didn't wrote them). Do all those scripts run with tcsh without modification? Is tcsh 100% compatible with the plain-old csh? $ which csh /usr/bin/csh $ which tcsh /usr/bin/tcsh $ uname -a SunOS purzelse 5.9 Generic_117171-07 sun4u sparc... (2 Replies)
Discussion started by: slashdotweenie
2 Replies

6. Shell Programming and Scripting

Differences between csh and tcsh

What are the differences between csh and tcsh shells ? In one of the shell scripts csh binary is a soft link to tcsh. (1 Reply)
Discussion started by: shafi2all
1 Replies

7. Shell Programming and Scripting

Unexpected end of file..with csh->tcsh

All; Thanks for reading. I'm having a heck of a time with this cshell script that fires off an hp temperature monitor and rotates logs. I keep getting '/opt/temperature/ line 22: syntax error: unexpected end of file' when I try to 'sh /opt/temperature/" it --script... (3 Replies)
Discussion started by: swjv
3 Replies

8. UNIX for Dummies Questions & Answers

diff between tcsh and csh -f

Hello Am very new to linux/unix, workin in it since 10 days only. I had started with bash and now I need to work in tcsh. I have changed shell for my user profile using 'chsh' I use gedit for script writing. Now in the first line if I write #!/bin/tcsh i get d msg /home/usr/.cshrc: No such... (2 Replies)
Discussion started by: mahendrakamath
2 Replies

Featured Tech Videos