################################################# # # AUTHOR: Seyon Verdtzabella # DATE: June 4, 2002 # PROJECT: SSDS Formage Project # # NAME: convawk_l # VERSION: 0.1b # # USAGE: # # awk -f convawk_l filename # # DESCRIPTION: # This program is the work horse that actually converts # formage logfiles into flatfile dbs # ################################################# BEGIN { FS = "^" OFS = "|" } #{ print $0 } #{ print $1 } #{ print $2 } $1 ~ /id/ { id=$2; fieldcount++ } $1 ~ /datatitle/ { datatitle=$2; fieldcount++ } $1 ~ /source/ { source=$2; fieldcount++ } $1 ~ /media/ { media=$2; fieldcount++ } $1 ~ /callnum/ { callnum=$2; fieldcount++ } $1 ~ /workstation/ { workstation=$2; fieldcount++ } $1 ~ /category/ { category=$2; fieldcount++ } $1 ~ /subject/ { subject=$2; fieldcount++ } $1 ~ /description/ { description=$2; fieldcount++ } /-+@$/ { if ( fieldcount == 9 ) { fieldcount = 0 print id, datatitle, source, media, callnum, workstation, category, subject, description } }