First post on here. So I use csh shells for my research (physics... not a CS person). I am trying to rerun the same scripts, but there are ~10 files that have similar variables that I have to change for each different configuration, so I would like one central file for the variables I change that get used in the various csh files.
Basically what I have been trying to do by scouring the internet but have had no success is to have a document with values:
l2064f211b600m011m055m645
l2064f211b600m011m055m645b
l2064f211b600m011m055m645c
l2064f211b600m011m055m645d
('0.645 0.645 0.645' '0.011 0.011 0.011' '0.011 0.011 0.055' '0.011 0.055 0.055' '0.055 0.055 0.055')
(645 011 011m 055m 055)
1.2
1.2
1.2
64
32
36
and then be able to call them in different csh files as if I had just done
set mass = ('0.645 0.645 0.645' '0.011 0.011 0.011' '0.011 0.011 0.055' '0.011 0.055 0.055' '0.055 0.055 0.055'), but instead from the file (call it specs)
, where I could then reference it later as $mass[$1] for 0.645 0.645 0.645.
I have tried to do
mass=$(awk 'NR==$1' specs)
, but I keep getting 'invalid variable' when I run the csh script.