Hi ...programmers...
I need a shell script to perform some specific task..
my txt file looks like this
netcdf new {
dimensions:
XAX1_11 = 11 ;
variables:
double XAX1_11(XAX1_11) ;
XAX1_11:point_spacing = "even" ;
XAX1_11:axis = "X" ;
float DEPTH(XAX1_11) ;
DEPTH:missing_value = -1.e+34f ;
DEPTH:_FillValue = -1.e+34f ;
DEPTH:long_name = "DEPTH" ;
DEPTH:history = "From new.txt" ;
float TEMPERATURE(XAX1_11) ;
TEMPERATURE:missing_value = -1.e+34f ;
TEMPERATURE:_FillValue = -1.e+34f ;
TEMPERATURE:long_name = "TEMPERATURE" ;
TEMPERATURE:history = "From new.txt" ;
float SALINITY(XAX1_11) ;
SALINITY:missing_value = -1.e+34f ;
SALINITY:_FillValue = -1.e+34f ;
SALINITY:long_name = "SALINITY" ;
SALINITY:history = "From new.txt" ;
// global attributes:
:history = "FERRET V6.82 21-Nov-12" ;
:Conventions = "CF-1.0" ;
data:
XAX1_11 = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ;
DEPTH = 1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 ;
TEMPERATURE = 28.25, 28.26, 28.23, 28.22, 28.2, 28.19, 28.18, 28.18, 28.18,
28.19, 28.19 ;
SALINITY = 36.42, 36.42, 36.43, 36.43, 36.42, 36.43, 36.43, 36.43, 36.44,
36.45, 36.44 ;
}
I have of need of output in following way
DEPTH TEMPR SALINITY
1 28.25 36.42
5 28.26 36.42
10 28.23 36.43
15 28.22 36.43
20 28.2 36.42
25 28.19 36.43
30 28.18 36.43
35 28.18 36.43
40 28.18 36.44
45 28.19 36.45
50 28.19 36.44
kindly programmers give me the script to get this output, I have lot of txt files of same format..
Thanks in advance
- Akshay