#!/bin/bash
# This converts SEGY (*.sgy) to BSEGY (*.seg) format
# and moves files to the ../seg directory

FILE=`ls -1 |sort |grep 10 |grep sgy`
for f in $FILE; do
bcnv $f 0 1 1               
NAME=`basename $f .sgy `
mv bcnv${NAME}.seg ${NAME}.seg
done
mv 1*.seg ../seg
rm *.lst -f
