[BACK]Return to myread CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / pari-2.2 / config

File: [local] / OpenXM_contrib / pari-2.2 / config / Attic / myread (download)

Revision 1.1, Tue Oct 2 11:16:55 2001 UTC (22 years, 8 months ago) by noro
Branch: MAIN

Initial revision

if test "$fastread" = yes; then
  echo "[$dflt]"
  ans=$dflt
else
  if test -n "$dflt"; then echo $n "[$dflt] $c"; fi
  while :; do
    read ans
    case "$ans" in
    '')
      ans="$dflt"
      break
      ;;
    !*)
      ans=`echo "$ans"|cut -c2-`
      break
      ;;
    *)
      if test -z "$rep"; then break; fi
      for i in $rep; do
        if test "$i" = "$ans"; then break 2; fi
      done
      echo $n "***  Please try something else : [$rep] $c"
      ;;
    esac
  done
fi