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.
1
vote
2answers
116 views
Can't remove same folder name twice
I have a folder called - bin , then I remove it by rm bin , re-create it and when I want to remove it again by rm bin the shell promts -
/bin/mv: cannot move `bin/' to ...
0
votes
0answers
51 views
less does not show expected output after sourcing a script in .cshrc
In our university we have a script to setup the working enviornment under linux. Since I am lazy I decided to add this process to the shell initialization by adding source /setup/script to .cshrc. ...
1
vote
2answers
38 views
Why would running a directory path as a command return “permission denied” and not “command not found”? [duplicate]
I am an a redhat box and I noticed that if I accidentally type in a dir path without cd in front of it, I get a /path/to/dir/: Permission denied.; however, I would expect it to say /path/to/dir/: ...
1
vote
1answer
96 views
Error converting a bash function to a csh alias
I am writing a csh alias so that I can use the following bash function in my csh :
function up( )
{
LIMIT=$1
P=$PWD
for ((i=1; i <= LIMIT; i++))
do
P=$P/..
done
cd ...
1
vote
2answers
112 views
“~/” receives a permission denied error in Csh
Running in Csh when using Tilde Notation performing a
~/
at the command line, I receive a "Permission denied." error. This directory is owned by the user performing the command and has the ...
1
vote
3answers
291 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
428 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
275 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 ...
3
votes
1answer
727 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
2answers
376 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
296 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
443 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
225 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
346 views
Can a home directory have both .cshrc and .bashrc files?
Or are they both not allowed at the same time?
0
votes
1answer
172 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?