#!/bin/bash # # -- Make the variable mesh definitions for the AM files # -- 1 parameter - the file name of the text file (mesh.txt) # PROG=`basename $0` # echo Start $PROG if [ $# -lt 1 ]; then echo Error - no filename specified exit 1 fi awk ' $1~/X/ {for(i=2;i<=NF;i++) xl[i-1]=$i; nx=NF-1; xmn=$2; xmx=$NF} $1~/K/ {for(i=2;i<=NF;i++) xd[i-1]=$i; nk=NF-1} $1~/Y/ {for(i=2;i<=NF;i++) yl[i-1]=$i; ny=NF-1; ymn=$2; ymx=$NF} $1~/L/ {for(i=2;i<=NF;i++) yd[i-1]=$i; nl=NF-1} END{ k=1; for(i=1;i<=nx;i++){ if(i1 && i1 && i