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.
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.
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-linux-gnu/libstdc++.so.6': No such file
But after figuring out which package it belongs to and trying to install that I get:
sudo apt-get install libstdc++6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libstdc++6 is already the newest version (9.1.0-2ubuntu2~19.04).
Any ideas? Thankful for any suggestion, cheers
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 run the second step in the root and user directory. But, it says
curl: Command not found.
tar: f2c.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
gunzip: No match.
f2c: No such file or directory.
How to solve the problem?
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 and its name is $FILENAME'
on command line when I give the following:
jo first sample.txt
I should get the output as
this is my first file and its name is sample.txt
instead I get
this is my first file and its name is !:2
The problem here is the symbol \ totally gets eliminated, I don't know how. That is needed if I want it to take the argument. Can anyone help out with this?
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 variables. The contents within 2221 and 7019 are important, but do not need to be set as variables; my scripts afterwords will take care of all of that.
My current script is the following:
# The purpose of this script is to take the note files provided and set the values as variables.
#!/bin/csh -f
set z=`grep -E '^z=' note | cut -d= -f2`
set nh=`grep 'NH' note | cut -d= -f2`
set xc=`grep 'Center' note | cut -d, -f1 | cut '-d' -f4`
echo $z $nh $xc
This sets three variables for use in the current directory (in this case, we will use NGC2201 as the parent directory and 7019 and 2221 as the sub-directories for these variables to be used on).
My question is how do I write a script to automatically set NGC2201 as a variable named $g and 2221 as a variable named $obs.
After the script runs through 2221, I would like it to then set the directory as 7019 and repeat the steps. After the directories within NGC2201 are finished, I would like the script to move on to IC0499, repeat the process, etc.
How do I get the script to run through the directories? I cannot make it global because it cannot be too intrusive; I need it to only go two directories deep to be satisfactory.
I would like to keep it within csh if possible, but if this is easier in tcsh or bash, I am all for it. Additionally, if there is an easier solution than looping it like this, I am all for that too.