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
1 vote
0 answers
76 views

How to set enviroment to use older gcc g++ version without changing default?

When trying to launch application I get this error: /libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /lib/x86_64-linux-gnu/libGLU.so.1) now this is certainly because I'm using Ubuntu 20....
onepound's user avatar
  • 111
0 votes
1 answer
969 views

How can I change directory text color in C shell?

I want to change directory color in cshell. So I copied /etc/DIR_COLORS file to my ~$home and named .dir_colors. I modified that file but it doesnt change the text color. If I source that file then ...
Cho's user avatar
  • 1
0 votes
1 answer
47 views

Reference all paths in single linux script - like a header file for better portability [closed]

Shell Scripting newbie here. Please bear with me. Linux 3.0.101-108.87-default x86_64 I have Script1.sh which is referencing folders . I am trying to include all these paths in the script in a single ...
Displayname's user avatar
1 vote
0 answers
678 views

illegal variable name with csh and tcsh

Ubuntu 20.04 with update on about 1 May 2021. NOT a linux expert. in bash terminal, % which csh /usr/bin/csh but when % csh illegal variable name. same for tcsh.
kaosmotic's user avatar
-2 votes
2 answers
2k views

Redirect output with '>&!'

I know that >& means redirect stderr to stdout. But I don't know the meaning of >&!, I tried following command but it seems like normal. Example: cat xxx.txt >&! xxx.output My ...
code_worker's user avatar
0 votes
1 answer
1k views

How to capture output from a command and pass it on to a variable in csh scripting?

I'm trying to capture output of command into variable in csh but its printing empty value to the variable. but if i run same command on terminal its working root_part_id=`gpart show | grep zfs | awk '{...
Sreekanth Chityala's user avatar
0 votes
1 answer
98 views

Setting Gnome extension from C shell (csh)

I want to set the enabled-extension but when I do this, it doesn't work. echo just prints to console and exec either say "File name too long" or shows me the usage for gsettings. But if I ...
Tapav's user avatar
  • 1
0 votes
0 answers
920 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 ...
Sagynbek Orunbaev's user avatar
1 vote
1 answer
345 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-...
izcho's user avatar
  • 11
0 votes
1 answer
64 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 ...
Jovin Miranda's user avatar
5 votes
2 answers
1k 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 ...
Puteri Intan Zulaikha's user avatar
0 votes
1 answer
835 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 ...
Jovin Miranda's user avatar
2 votes
1 answer
1k 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 ...
Jovin Miranda's user avatar
0 votes
1 answer
268 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 ...
MrLi's user avatar
  • 1
1 vote
1 answer
2k 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 ...
J. Doe's user avatar
  • 333
0 votes
2 answers
366 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 ...
J. Doe's user avatar
  • 333
0 votes
1 answer
4k 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 ...
Alex Fr's user avatar
2 votes
1 answer
2k 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 ...
pah8J's user avatar
  • 331
6 votes
1 answer
17k 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 ...
Krsztr's user avatar
  • 447
0 votes
1 answer
1k 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. ...
Krsztr's user avatar
  • 447
0 votes
1 answer
54 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? ...
Krsztr's user avatar
  • 447
0 votes
1 answer
760 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 ...
Krsztr's user avatar
  • 447
1 vote
2 answers
3k 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 ...
Ather Cheema's user avatar
0 votes
0 answers
712 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; \ ...
Tanmoyee Bhattacharya's user avatar
2 votes
2 answers
189 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 ...
Tanmoyee Bhattacharya's user avatar
0 votes
1 answer
47 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. ...
Sandro Sivsivadzé's user avatar
2 votes
1 answer
451 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. ...
Hans's user avatar
  • 1,261
1 vote
1 answer
2k 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 ...
Arvind GK's user avatar
4 votes
2 answers
25k 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 ...
Alexander Peace's user avatar
1 vote
4 answers
5k 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 ...
Karan Shah's user avatar
1 vote
1 answer
553 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!!!!!!\...
Anonymous's user avatar
  • 405
0 votes
0 answers
220 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'...
Anonymous's user avatar
  • 405
2 votes
1 answer
585 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 ...
WX_M's user avatar
  • 121
0 votes
2 answers
9k 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.
Raj's user avatar
  • 1
0 votes
1 answer
141 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 ...
Manali Roy's user avatar
1 vote
2 answers
7k 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 ...
Vishal Gupta's user avatar
3 votes
1 answer
688 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 ...
eng_ahmed's user avatar
0 votes
1 answer
4k 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 ...
Akash Ramachandran's user avatar
0 votes
1 answer
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 ...
Afshin RK's user avatar
3 votes
3 answers
18k 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 ...
Nitish Srivastava's user avatar
0 votes
1 answer
3k 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 ...
Slimjimmy's user avatar
1 vote
1 answer
270 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.
ang nickolas's user avatar
9 votes
2 answers
40k 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/...
user296662's user avatar
0 votes
2 answers
3k 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 ...
user288566's user avatar
2 votes
2 answers
811 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 ...
WxPilot's user avatar
  • 1,816