from 2nd post,
see fpmurphy's profile and badges
file base of asc and hdr must match then only it should add latitude, longitude, etc...to main file, solution given by pamu is working fine, but to process number of files I have to include for loop, so I had asked...if anybody knows any good book or link to learn shell scripting please put link, I am very poor, in shell scripting..I know only C...
---------- Post updated at 03:28 AM ---------- Previous update was at 03:07 AM ----------
actually header file is having more information when I tried with another file I got wrong result....
Pamu's script reads, full header file, it should not read actually it has to filter out only particular information only...
they are ship,cruise,station, lat,long,DEPTH(SONIC),DEPTH(CAST),sst, and cast
* Sea-Bird SBE19plus Data File:
* FileName = D:\SK-296_CTD_portable\Hex_data\n12a001001.hex
* Software Version 1.59
* Temperature SN = 6336
* Conductivity SN = 6336
* System UpLoad Time = Jul 14 2012 18:12:59
** SHIP : India-ship
** CRUISE : 500
** STATION : n12a001
** LAT : 21 12.1985 N
** LONG : 89 27.016 E
** DEPTH(SONIC) : 93 m
** DEPTH(CAST) : 77.7 m
** SST : 29 degC
* ds
* SBE 19plus V 2.3 SERIAL NO. 6336 14 Jul 2012 17:58:03
* vbatt = 12.2, vlith = 8.6, ioper = 61.8 ma, ipump = 39.9 ma,
* iext01 = 4.6 ma, iext2345 = 27.1 ma
* status = not logging
* number of scans to average = 1
* samples = 103375, free = 3767104, casts = 11
* mode = profile, minimum cond freq = 2700, pump delay = 60 sec
* autorun = no, ignore magnetic switch = no
* battery type = alkaline, battery cutoff = 7.5 volts
* pressure sensor = strain gauge, range = 5076.0
* SBE 38 = no, WETLABS = no, OPTODE = no, Gas Tension Device = no
* Ext Volt 0 = yes, Ext Volt 1 = no
* Ext Volt 2 = yes, Ext Volt 3 = no
* Ext Volt 4 = yes, Ext Volt 5 = no
* echo characters = yes
* output format = raw HEX
* S>
* 19plus
* dh
* cast 1 13 Jul 2012 07:31:59 samples 1 to 8619, avg = 1, stop = mag switch
-----
still some texts are there...not including...
Pls help....