Generate XDS.INP: Difference between revisions

(→‎The script: small fixes)
Line 153: Line 153:
  pos1=`echo "$NAME_TEMPLATE_OF_DATA_FRAMES" | awk '{print index($0, "?")}'`
  pos1=`echo "$NAME_TEMPLATE_OF_DATA_FRAMES" | awk '{print index($0, "?")}'`
  pos2=`echo "$NAME_TEMPLATE_OF_DATA_FRAMES" | sed -e "s/[^\?]//g" | awk '{print length+'$pos1' - 1'}`
  pos2=`echo "$NAME_TEMPLATE_OF_DATA_FRAMES" | sed -e "s/[^\?]//g" | awk '{print length+'$pos1' - 1'}`
  data_first=`cat tmp1 | cut -b $pos1-$pos2 | head -n1|bc`
  data_first=`cut -b $pos1-$pos2 tmp1 | head -n1 | bc`
  data_last=`cat tmp1 | cut -b $pos1-$pos2 | tail -n1|bc`
  data_last=`cut -b $pos1-$pos2 tmp1 | tail -n1 | bc`
  DATA_RANGE="$data_first $data_last"
  DATA_RANGE="$data_first $data_last"
   
   
2,684

edits