Generate XDS.INP: Difference between revisions

(→‎The script: fix typo)
Line 152: Line 152:
  # Find the first '?' position and the number of '?' to determine DATA_RANGE=.
  # Find the first '?' position and the number of '?' to determine DATA_RANGE=.
  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=`cut -b $pos1-$pos2 tmp1 | head -n1 | bc`
  data_first=`cut -b $pos1-$pos2 tmp1 | head -n1 | bc`
  data_last=`cut -b $pos1-$pos2 tmp1 | tail -n1 | bc`
  data_last=`cut -b $pos1-$pos2 tmp1 | tail -n1 | bc`
2,684

edits