#!/bin/sh # Shell script: in progress # # authored by Kevin FitzGerrell # # uses file STATION.blocks # and builds file STATION.table with period and phase info. STATION=$1 cd /usr/scripts cat /usr/scripts/newline > /usr/scripts/t0.tmp sed 's/^END/e/;$d' /usr/scripts/${STATION}.blocks >> /usr/scripts/t0.tmp sed 's/^.*= //' /usr/scripts/t0.tmp > /usr/scripts/t1.tmp nawk 'BEGIN {FS = "\n"; RS = "e"; OFS = ","; ORS = "\n"} $3 ~ /(BLNALM$)/ { printf("%-24s%-30s\n\t%-30s%-15s%-15s\n\t%-30s%-15s%-15s\n\t%-30s%-15s%-15s\n\t%-30s%-15s%-15s\n\t%-30s%-15s%-15s\n\t%-30s%-15s%-15s\n\t%-30s%-15s%-15s\n\t%-30s%-15s%-15s\n", $2, $4, $8, $11, $12, $14, $17, $18, $20, $23, $24, $26, $29, $30, $32, $35, $36, $38, $41, $42, $44, $47, $48, $50, $53, $54) }' t1.tmp >t2.tmp nawk '$1 !~ /(0$)/ { print $0 }' t2.tmp > /usr/scripts/${STATION}.alm_list rm t0.tmp rm t1.tmp rm t2.tmp