Skip to main content

Questions tagged [csh]

csh, or the C shell, is a command interpreter with a syntax reminiscent of the C programming language.

0 votes
0 answers
26 views

How to exclude a particular column in a text file using UNIX "cut" command [duplicate]

Basically, I'm looking for the compliment of the current UNIX command "cut". If I have a text file as below "1" , "cat" , "animal" "2" , "parrot ,...
Mike's user avatar
  • 1,271
0 votes
1 answer
47 views

why won't sourcing a cshell command which redirects stdout & stderr to /dev/null in the background work

c-shell I want to rm -rf a dir in the background and redirect stdout & stderr to /dev/null. Like this... rm -rf del_this_dir >& /dev/null & This works fine when I type it in at the ...
daveg's user avatar
  • 1,171
0 votes
1 answer
41 views

CSH loop over results from grep not giving desired outcome

I want to loop over the lines as output by grep cmd from a file. The lines follow a format where there will be a word matched / not matched by the grep and then some other word that some other program ...
Gert Gottschalk's user avatar
0 votes
1 answer
33 views

set variables in csh script using another file

How can I set a username and password as variables in csh script using files that contain the username or password? So within the first shell script, something like: username=*usernamefile.txt*; ...
teejay's user avatar
  • 1
1 vote
1 answer
119 views

What is the correct quoting for a variable expansion (a filename) inside double-quoted backticks in CSH?

Let's say that you're in a system with devilish filenames, for eg. # a horrible filename: set link = ' '\'' " \ ` $# \ \ ' # an even worse logical link ln -s $link:q $link:q Now I would ...
Fravadona's user avatar
  • 15.7k
0 votes
0 answers
20 views

How to escape backticks in FreeBSD

This is on csh (FreeBSD): echo "complete service 'c/-/(e l r v)/' 'p/1/`service -l`/' 'n/*/(start stop reload restart status rcvar onestart onestop)/'" >> /root/.cshrc I want to use ...
ratatata's user avatar
0 votes
1 answer
33 views

How to know if the specified file is in my P4CLIENT's view?

I have a script that reads the file path from the terminal. In the script, I checked if the file was in the P4 client's view. But I want to get rid of error messages. I am using p4 have. Redirecting ...
Gor Abgaryan's user avatar
0 votes
0 answers
15 views

csh script doesn't resolve argv correctly

I have a text file with the following keywords: bvca_sc=2.3 bvca=$bvca bvca_sc=$bvca_sc I need all of the above to be equal to 24.1 bvca=24.1 bvca_sc=24.1 doing this on command line works perfectly: ...
Pedro Cardoso's user avatar
0 votes
1 answer
64 views

How to preserve newline characters in CSH when storing in a variable or echo

I have a python script which is getting called from a csh script ( I can not use bash). The python script prints out string with the newline characters and I am storing the output in a csh variable. ...
DDStackoverflow's user avatar
0 votes
1 answer
38 views

Login to a new machine and run the rest of csh script in that new machine

I have a linux csh code. I need to run part of the code in another virtual machine. How can I do that? My code has following steps echo $PWD rsh mkdir NEW cd NEW echo $PWD Logout from new machine cd ...
amare ghn's user avatar
1 vote
0 answers
35 views

Difference between tcsh and bsd-csh in terms of use of square brackets in echo

I have two simple Shell scripts that essentially do the same thing (i.e., printing all arguments), as are shown below. S1: #!/usr/bin/tcsh echo [$argv[*]] S2: #!/usr/bin/bsd-csh echo [$argv[*]] S1 ...
zanetu's user avatar
  • 3,848
3 votes
1 answer
108 views

Weird error with non-ASCII character in CSH

What is so special about the character "à" (a accent-grave) that makes the following assignement in CSH fail: #!/bin/csh -f set title = `echo 'à'` echo $title It does NOT fail for any ...
TeX Apprentice's user avatar
0 votes
0 answers
39 views

Can a csh script be made to "Not Execute" the date command in an echo statement

I have a cron task that captures log files every six hours. We have a post installation script that executes after we do an install and this script builds the crontab. It is a csh script that uses the ...
Qman's user avatar
  • 138
0 votes
1 answer
95 views

Multiple single core srun on a node

I have a csh script that looks like this foreach n (`seq 1 1000000`) ./myprog${n}.x end I want to parallelize it and run it on my slurm cluster, and because each instance of the program requires ...
byrdman1982's user avatar
0 votes
0 answers
97 views

csh shell read .tshrc rather than .cshrc startup file

I use csh shell ($ echo shell -> /bin/csh) and this time I added a environment variable $path to .csh file. However, every time when log in I need to source the .cshrc file to make this environment ...
Qiren Dong's user avatar

15 30 50 per page
1
2 3 4 5
80