Tagged Questions

The C shell (csh), once one of the two major Unix shells with the Bourne shell. Csh had more advanced interactive feature but has been surpassed by modern Bourne-style shells such as zsh and bash.

learn more… | top users | synonyms

1
vote
3answers
1k views

How to change shells via script?

I have to repeat following operation a lot of times, hence I want to automate it. sudo su tcsh cd $workDir Here $workDir is set in ~/.tcshrc. I tried writing two shells scripts. Script1 is temp.sh ...
2
votes
1answer
4k views

How to debug csh scripts?

My lab uses csh scripts to run jobs. It is usually difficult for me to debug a shell script, so I'm wondering if there is a csh debugger I can use. I know there are some flags like -x or -v that can ...
2
votes
1answer
1k views

Inserting a file into another file using sed

I want to insert the contents of file1 into file2 after a matching PATTERN. I want to do it only after the first occurrence of the PATTERN. I would like to know the modification I need to make to ...
4
votes
3answers
4k views

stderr redirection not working in csh

I run the following command: pkg_add emacs-23.4,2.tbz 2> output.log The output still displays in the terminal. When I press ↑, I get pkg_add emacs-23.4,2.tbz 2 > output.log with a space ...
1
vote
3answers
805 views

dircolors “missing second token”

I'd like to customize the colors of ls and as far as I understand the way to go is with dircolors. I did: dircolors > ~/.dircolors Immediately after this I launch a terminal and get this error: ...
2
votes
1answer
747 views

What's wrong with this csh file?

I don't have any experience writing .sh files. I want to run the pvm2raw utility of this app from the Volume Library. I get the following error when running build.sh in Ubuntu 10.10. build.sh is ...
1
vote
2answers
1k views

Alias Loop in csh

Why is there an Alias loop error created here: alias df 'printf "\n"; df -hP | column -t' But not here: alias df 'df -hP | column -t' I realize I could call the alias something else and still ...
1
vote
1answer
341 views

colorizing ls output based on filename

i'm on freeBSD and trying to colorize ls output, so i've added alias ls ls -lhG setenv LSCOLORS gxfxcxdxbxegedabagacad to my .cshrc and it works. but what i really want to - is to be able ...
5
votes
2answers
660 views

Can a home directory have both .cshrc and .bashrc files?

Or are they both not allowed at the same time?
0
votes
1answer
340 views

debug php script and output result and errors to a text file

Can someone tell me how to to run a php script and output content and errors to a text file (using nohup) using csh?
1
vote
2answers
5k views

sed command to replace a blank line with two lines of content

How do I replace the first blank line with two lines of content? I did see a question on replacing multiple blank lines with a single blank line in vim sed but don't quite see how to adapt that. So, ...
2
votes
3answers
2k views

cshrc execute bashrc within itself?

My school has our Linux accounts using csh/tcsh by default. I, however, have a lot setup on my home bashrc and I'd like to use that at school. BUT there's also some important stuff that happens in our ...
3
votes
5answers
1k views

Does $SHELL store the path to the default shell in Linux?

My administrator says that my default shell is set to bash, but $ echo $SHELL /bin/csh $ Is the default shell related to the SHELL variable at all? Is not, what is the variable used for?