Questions tagged [csh]

The C shell (csh or tcsh) is an alternative to the Bourne shell (sh) which is the default with Ubuntu Linux.

Filter by
Sorted by
Tagged with
-5
votes
0answers
91 views

What are the similarities and differences between “|”, “>”, and “`” and between piping and process substitution? [duplicate]

I know they are a very useful command line and also know a little bit how to use those commands. There are three ways to represent the information on the command line such as using: | > ` I am ...
0
votes
0answers
36 views

I can't run my csh-script in Ubuntu

I write sch-script (cm2.csh) and trying to run in Ubintu (c shell installed), but receive error like: bash: ./cm2.csh: /bin/csh/: bad interpreter: Not a directory This is my script: #!/bin/csh -f ...
1
vote
1answer
24 views

Shared library seems installed but I get an error anyway

Objective: Install/run an app through csh or tcsh, it's a 3d liquid simulation app called realflow. Background: I downloaded the app, try to run it through csh or tcsh. I get strings: 'lib/i386-...
0
votes
1answer
35 views

Trying to enter a directory from the first line of another file

Currently using csh at workplace. So what i currently have is a path stored in the first line of a file and i am trying to read that. head -n 1 jvar.txt Now i have to go to that path so i was ...
0
votes
0answers
42 views

keeping PWD while switching to grids

I am currently using cshell at my workplace. foll. is the alias i had kept as a shortcut to login to my grid alias joreg 'qrsh -P grid1' Now whenever i go from my home to another grid it takes me ...
5
votes
2answers
731 views

How to run a csh script to install f2c?

I need to install f2c in Linux. Given the steps; Download installation script : Download install_f2c_linux.csh. Run installation script # chmod +x install_f2c_linux.csh # ./install_f2c_linux.csh I ...
0
votes
1answer
215 views

Error while executing read prompt in csh and converting to multiline alias

Hey everyone i have this issue where i have a sample program in csh (i know its not the best language to use for scripting but i dont have an option here) its as foll: #!/bin/csh echo 'please ...
2
votes
1answer
334 views

Unable to use variables in alias in cshell

This is a sample straight forward program. I am using C-shell and want a solution for this environment itself. Following this code sample: set FILENAME = "\!:2" alias jo 'echo this is my \!:1 file ...
0
votes
1answer
166 views

Why will “0.0u 0.0s 0:00.00 0.0% 0+0k 0+0io 0pf+0w” display on screen from cshell? [closed]

friends, I don't know why "0.0u 0.0s 0:00.00 0.0% 0+0k 0+0io 0pf+0w" (and many lines like this) will display when I run some C shell script, but not when some others run. And I never encountered with ...
1
vote
1answer
486 views

How to set up a loop in csh to set variables to directory names?

My file structure is like this. unix% ls NGC2201 IC0499 IC7216 NGC7169 unix% cd NGC2201 unix% ls 7019 2221 note where 7019 and 2221 are new directories and note is a text file that I use to create ...
0
votes
2answers
127 views

Using a file to input variables in csh scripting

unix%:~/tmp$ cat tmp.txt z=0.016728 NH=5.7E20 Center for spectra: 2:00:14.906, +31:25:45.826 I would like for the value of z to be set to a variable named $redsh, the value of NH to be $abun, and ...
0
votes
1answer
1k views

Illegal variable name csh script

I need some help.I try to write csh script and I need to iterate through all files in current dir and do some tasks, so I wrote this: #!/bin/csh foreach f ($(ls)) if( some condtions) echo ...
1
vote
1answer
402 views

How to integrate “run as shell script” in right click menu of file manager? [closed]

Now when I want to run a shell script (.sh or .csh file), I need to right click the file manager and click "open terminal here", then type "./xxx.sh" to run the shell script file. It is very ...
4
votes
1answer
3k views

How do I set a variable to a command's output in csh?

I have a number in a text file like : int_width: 5230 I want to set this number (5230) to a variable in csh. What is the correct form? (grep is working before setting) set WIDTH = "$(grep int_width ...
0
votes
1answer
498 views

execute a script for each line of an input file

I have a txt file with 100 lines and 5 columns. I want to automatize a script, with reading the file each lines, make the first column the first argument, the second column the second argument etc. ...
0
votes
1answer
50 views

putting two files into one

I have two files: one.txt with 108 lines and 10 columns and two.txt with 1 line and one column. I want to add the number in two.txt to each line of one.txt as the 11th column. What is the best option? ...
0
votes
1answer
92 views

add a new column with a constant into a file

I have a file with 108 lines and 3 columns. I want to add each line a 0 (in the fourth column) in cshell. like from this 11443 225 3 1245645 22 3 18966 2975 3 ... to this 11443 225 3 0 1245645 ...
1
vote
2answers
1k views

How do I fix “MANPATH: undefined variable.” in csh?

I am installing some open source software by compiling its source code -- on Ubuntu 16.04 -- by following the instructions in its 'readme' file. At certain point (point 3b in the link) the guideline ...
0
votes
0answers
312 views

Unmatched '. in awk

I am running a script containing this code in Ubuntu: #!/bin/csh -f set file = $1 if ($1! == "" ) then awk '{ \ if ( NR == 1 ) NCOLS = $2; \ if ( NR == 2 ) NROWS = $2; \ if ( NR == 3 ) LL_LNG = $2; \ ...
2
votes
2answers
138 views

Problem in awk command

I have to extract latitude and longitude from an ASCII text file in Ubuntu using the awk command. I wrote the code below and saved it in untitled.sh: #!/bin/csh -f set file = $1 if($1! = "") then ...
0
votes
1answer
40 views

Where can I find a list of the features from Korn and C shells incorporated by Bash?

I would like to have some documentation about the features from Korn (ksh) and the C (csh) shells incorporated in the Bash command language interpreter. A exhaustive list of commands would be great. ...
2
votes
1answer
249 views

Graphical displays in .cshrc or .login files

I decided to follow a UNIX tutorial just to understand my Kubuntu a little bit more, in the tutorial's eighth chapter, I am advised to WARNING: NEVER put commands that run graphical displays (e.g. ...
1
vote
1answer
598 views

removing bulk pdf password

I have a bunch of pdf files and its password in another file, I need to find a way to remove password protection and create a unencrypted pdf file, with the same file name. What would be a best ...
2
votes
1answer
10k views

Opening a .PS from command line

I want to open a .PS (postscript file) having produced it from a .csh script running a series of GMT commands preferably using ghostview. I am trying: gv plot.ps This however opens ghostview but not ...
1
vote
2answers
3k views

Error while matching End of line with $ in Sed command

I am currently applying the below command in csh through a shell script. sed -i "s/cb $i$/cb $i $cb/" */callback_events Where: $i - Value of Variable i $cb - Value of Variable cb $ - To match the ...
1
vote
1answer
302 views

C shell script last command not working

I have this C shell (unfortunately C is required) script called EditFile.script consisting entirely of 6 different sed commands, all to be applied to one text file. #!/bin/csh -f 1i GameTime!!!!!!\...
0
votes
0answers
58 views

Navigate through past commands in C shell?

For a certain assignment I am required to use a C shell. I already have csh up and going. However, I've noticed that usually when I press the up and down keys on bash terminal I see past commands I'...
2
votes
1answer
357 views

Looping through directories using a csh command

I am trying to get a list of folders in my directory 'KEAX', and then dive into each one of them. After entering each folder, I want to run the command: foreach f(*.tar) tar -xvf$f end After ...
0
votes
2answers
5k views

Unable to locate package “csh”

I tried installing csh, but it throws me the error: unable to locate package csh My Ubuntu version is 12.04.
0
votes
1answer
71 views

Installing imod_4.7.15_RHEL6-64_CUDA6.0.csh in ubuntu

Can anyone help me with the installing of imod_4.7.15_RHEL6-64_CUDA6.0.csh software.imod is a image software,which I have downloaded from http://bio3d.colorado.edu/imod/download.html.I have extracted ...
1
vote
2answers
3k views

Floating point in CSH?

I have been trying to run this script, but it gives the error "badly formed number" due to the decimal 0.2224. If I replace it with any integer, the script works fine. #!/bin/csh -f set shift="-1 2 ...
3
votes
1answer
521 views

echo $SHELL: unexpected result [duplicate]

I am facing a problem related to the shell change, when I change the shell from bash to csh and type the comand echo $SHELL, I expect the shell to print: /bin/csh But instead it prints: /bin/bash ...
0
votes
1answer
2k views

Problem with sudo apt-get update on Ubuntu 14.04 virtual machine

My problem began when I was tried to install the mmtsb (multiscale modelling toolset for structural biology) on an Ubuntu 14.04 Virtual Machine on a Windows Host. I tried giving the ./install.sh ...
0
votes
1answer
2k views

Odd Illegal Variable Name error in csh script

I have a peculiar problem with a csh script which occurs only in my Lenovo Z500 laptop. I have run the script in 3 other computers with analogous operating systems (Kubuntu 14.04 x64) and the only ...
2
votes
2answers
10k views

how to source csh script from bash environment?

I am using bash shell but some of the scripts that I need to source are in csh format. Can somebody tell how I can source csh scripts from bash shell? By sourcing I mean the sourced csh script should ...
0
votes
1answer
2k views

Setup: command not found. Cannot run installer

I'm installing Abaqus on Ubuntu. I have extracted the rar files into a directory. In terminal, I navigate to the directory and run the setup file using "sudo /directory_name/setup". Terminal gives me ...
1
vote
1answer
146 views

Is there an environment variable in csh to modify PS2?

Is there an environment variable in CSH to change the PS2 like in bash and sh? For example: $PS2 = "hi" I tried it but it doesn't work in csh.
7
votes
2answers
29k views

No csh or tcsh?

In /bin, I see bash, but no csh or tcsh. When I created a ".cshrc" file in my home directory, it had no effect; that's how I discovered this problem. So the question is this: how do I switch to csh/...
0
votes
2answers
2k views

How I can Install csh as a non-root user?

I need csh for installing a package but I am not root user... I want to install it for my user. I installed csh_20070713.orig.tar.gz, csh_20070713.diff.gz and csh_20070713-2ubuntu1.dsc But there is ...
2
votes
2answers
654 views

Extract a date from a filename for CSH script?

I am trying to write a CSH script that will look at components of the filename to generate a date/time. The problem is, I have no idea how to extract part of a filename to use it. Here is a sample ...