#!/bin/csh -f
echo All keywords have to be uppercase
if (-e $1) then
sed 's/^SIMU/ SIMU/g' $1 \
| sed 's/^DELU/ DELU/g' \
| sed 's/^ISOR/ ISOR/g' \
| sed 's/^SADI/ SADI/g' \
| sed 's/^DFIX/ DFIX/g' \
| sed 's/^DANG/ DANG/g' \
| sed 's/^CHIV/ CHIV/g' \
| sed 's/^BUMP/ BUMP/g' \
| sed 's/^SUMP/ SUMP/g' \
| sed 's/^FLAT/ FLAT/g' \
| awk '{if (/^CGLS/) {printf " %s \nDAMP 0 0\nL.S. 1\n",$0} else {printf "%s\n",substr($0,0,length($0)-1)}}'
else
echo file '$1' is not found
endif
