#!/bin/bash
echo -n "SEG-Y file name: "
read _segyin
_jobid=$(hexdump -C -s 3200x -n 4 $_segyin | awk '{print $2 $3 $4 $5}')
_linenumber=$(hexdump -C -s 3204x -n 4 $_segyin | awk '{print $2 $3 $4 $5}')
_reelnumber=$(hexdump -C -s 3208x -n 4 $_segyin | awk '{print $2 $3 $4 $5}')
_tracesperrec=$(hexdump -C -s 3212x -n 2 $_segyin | awk '{print $2 $3}')
_auxtraces=$(hexdump -C -s 3214x -n 2 $_segyin | awk '{print $2 $3}')
_sampleinterval=$(hexdump -C -s 3216x -n 2 $_segyin | awk '{print $2 $3;}')
_samplespertrace=$(hexdump -C -s 3220x -n 2 $_segyin | awk '{print $2 $3;}')
_filesize=$(stat -c%s $_segyin)
_formatcode=$(hexdump -C -s 3224x -n 2 $_segyin | awk '{print $2 $3;}')
let decjobid=0x$_jobid
let declinenumber=0x$_linenumber
let decreelnumber=0x$_reelnumber
let dectracesperrec=0x$_tracesperrec
let decauxtraces=0x$_auxtraces
let decsampleinterval=0x$_sampleinterval
let decsamplespertrace=0x$_samplespertrace
let decformatcode=0x$_formatcode
let declocation1=0x$_location1
echo 'Job Id: '$decjobid
echo 'Line number: '$declinenumber
echo 'Reel number: '$decreelnumber
echo 'Traces per record: '$dectracesperrec
echo 'Number of aux traces per trace: '$decauxtraces
echo 'Sample interval: '$decsampleinterval
echo 'Samples per trace: '$decsamplespertrace
echo 'Format code: '$decformatcode
echo 'Dec filesize: '$_filesize
No comments:
Post a Comment