#!/bin/sh if [ $# -lt 2 ] then echo " Usage: `basename $0` inputfile outputfile" exit fi if [ ! -f $1 ] then echo "$1 not exist" exit fi if [ -f $2 ] then echo File $2 exist exit fi sed ' s/^north.*/cellsize 30/ s/^south:/yllcorner/ s/^west:/xllcorner/ s/^rows:/nrows/ s/^cols:/ncols/ /^east/d' $1 > $2