Options for csh shell


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Options for csh shell
# 8  
Old 05-23-2002
The question is that I'm using a terminal emulation program (X-Win32) to access Unix, because here in my work we have just WindowsNT in the clients and Solaris at the servers. All the database and shared softwares are at the servers and we have to access it throught the terminal.
I have already tried to read the csh and tcsh man pages but these shells are quite different. I think that are impossible to do that changes in the csh prompt.

At this point of view bash are more simple to consult, because its man page are more complete than csh.

Another thing that I'm not satisfied with csh is that we don't have the choice of "colored ls". In bash, this options turn the visualization of the contents easier.

That's all

Luiz
# 9  
Old 05-31-2002
Quote:
Originally posted by LivinFree


Huh? What Linux variant are you using?
Bash is a superset of sh - csh is typically linked to tcsh on every Linux system I've ever used...

Code:
$ cd /bin; ls -li *sh|sort
 652806 lrwxrwxrwx   1 root     root            4 Apr  5  2001 sh -> bash*
 652807 -rwxr-xr-x   1 root     bin        477692 Mar 21  2000 bash*
 652860 -rwxr-xr-x   1 root     bin        306453 Apr  7  2000 tcsh*
 652861 lrwxrwxrwx   1 root     root            4 Apr  5  2001 csh -> tcsh*
 652879 -rwxr-xr-x   1 root     bin         59628 Aug  3  1999 ash*
 652882 -rwxr-xr-x   1 root     bin        338536 Jun 14  2000 zsh*
 653126 -rwxr-xr-x   1 root     root           30 Oct  4  2001 rbash*
$ uname
Linux

I'm using 95% of the time FreeBSD and OpenBSD, and I said this because Linux uses bash, and AFAIK csh is linked to bash, and in the same time csh on FreeBSD is tcsh.
# 10  
Old 06-01-2002
Re: Options for csh shell

Hi,

I do not know how it works in c or bash shell. But in k shell you have can do the following

export BOLD=`echo \033[1`
export NORMAL=`echo \033[0`

similarly for underline, reverse text etc replace the number 1 with other values. before any text you type just add this shell variable and after this text add the $NORMAL.

e.g
PWD=`pwd`
PS1="$BOLD`hostname`$NORMAL :$PWD.

This gives you a prompt with the hostname in bold followed by the present working directory



Hope this helps you

rgds
penguin
# 11  
Old 06-03-2002
my prompt is set as follows:
Code:
        set prompt = '[%B%n@%m%b] %B%~%b%# '

It works in tcsh. %B means /bold/, %b means /end of bold/
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pass C shell array to another C shell script(csh) and shell(sh)

Dear Friends, Please help me on this my script name is send.csh In this i have written the statement like this set args = ( city state country price ) I want to pass this array to another c shell called receiver.csh. and i want to use it in this c shell or how to pass to... (2 Replies)
Discussion started by: SA_Palani
2 Replies

2. Shell Programming and Scripting

Regarding c-shell (csh) scripting

Hi, I'm reading a csh setup script, and came across these lines: ################################ if (! $?PROJECT_ROOT) then setenv PROJECT_ROOT /proj/proj_123 endif ################################ Does the if endif command means, "if there is no variable named "PROJECT_ROOT",... (3 Replies)
Discussion started by: mar85
3 Replies

3. Shell Programming and Scripting

Write a shell script with options

Hi All I am little bit confused to write a script. This script needs the options like unix commands i.e. –S to start process. –C to check process. -u : user -p : password like. script should run like this ./script.sh -u username -p ***** -S processname there may... (5 Replies)
Discussion started by: atul9806
5 Replies

4. Shell Programming and Scripting

shell script options

one thing i was trying to figure out is if you can give people the option to choose what they want to do in a shell script. for example, let's just say that you have a simple shell script to install a couple of programs, can you make it to where you can press a certain key to install a certain... (1 Reply)
Discussion started by: hotshot247
1 Replies

5. Shell Programming and Scripting

Filenames in CSH shell

Hi, I am running into a bit of a problem. I am trying to write a script that will run an interactive (fortran) program repeatedly to dump data across 36 data channels... anyway. I have gotten this far... #!/bin/csh set i=0 while ($i<2) fitsfilter $1<<EOF $i 0 9 1 1 g 2 1250 -100... (5 Replies)
Discussion started by: madtowneast
5 Replies

6. Shell Programming and Scripting

Shell script to invoke options automatically

i have a script which has 2 options. a b And a has 6 sub options. i want to write a script which will call the parent script and give options automatically. examle: linasplg11:/opt/ss/kk/01.00/bin # startup.sh /opt/ss/rdm/01.00 Please select the component to... (2 Replies)
Discussion started by: Aditya.Gurgaon
2 Replies

7. Shell Programming and Scripting

Adding options to a shell script

I want to add options to my shell script but having problems, my code so far is; #!/bin/bash lflag= iflag= while getopts 'l:i:' OPTION do case $OPTION in l) lflag=1 lval="$OPTARG" ;;... (1 Reply)
Discussion started by: paulobrad
1 Replies

8. Shell Programming and Scripting

different shell csh bash

I'm always having to work in the cshell, but occasionally want to run a command using bash. is that possible? I know I could write a shell script and call bash at the begining with #!/usr/bin/bash and then my command, is there another way? (1 Reply)
Discussion started by: ajp7701
1 Replies

9. Shell Programming and Scripting

Adding -options to shell scripts

I'm sure this is something simple I am overlooking somehow. I'd like the ability to pass -options into my shell scripts. For example my file called "input.sh" I can do the following: root# ./input.sh 1 and it will result: root#./input.sh 1 You passed me a 1 Just like an init script, etc.... (4 Replies)
Discussion started by: sysera
4 Replies
Login or Register to Ask a Question