Bash Shell script problem after upgrade

Linda haniganwork at earthlink.net
Mon Jan 3 16:46:18 UTC 2011


I have bash shell scripts that ran under LTS 8.04 and no longer work. They still ask the questions for the variables but the output file is not created. I have tried to keep the bones of the script and have gotten rid of most of the content that is echoed to the file. I tried commenting out the lpr command and the file is not created. Why would this file that has worked since the 1980s no longer create a file with LTS 10.04.
               Thanks
               Linda

# Rprice_ prints price list
#!/bin/bash
TEMP=/usr/local/lib/tmp/price$$
EMAIL=/usr/local/lib/email/price$$
echo "What type of price list do you want? (Q P )"
read style
echo "How many copies do you want? "
read copies
case $style in
   p|P) type=PREMIUM
      file=/usr/local/lib/price/$type
      if [ ! -f "$file" ] ; then
         echo "$file does not exist, Hit return to continue."
         exit
      fi
      cat /usr/local/lib/misc/Lhead.ps >> $TEMP
      echo ' /Times-Roman 12 selectfont ' >> $TEMP
      echo "176 625 moveto (2011 RENTAL SIZES \& PRICES - PAGE 1) show " >> $TEMP
      cat /usr/local/lib/misc/reg-ps.1 >> $TEMP
      ;;
   q|Q) type=QUALITY
      file=/usr/local/lib/price/$type
      if [ ! -f "$file" ] ; then
         echo "$file does not exist, Hit return to continue."
         exit
      fi
      cat /usr/local/lib/misc/Lhead.ps >> $TEMP
      echo ' /Times-Roman 12 selectfont ' >> $TEMP
      echo "176 625 moveto (2011 RENTAL SIZES & PRICES - PAGE 5) show " >> $TEMP
      cat /usr/local/lib/misc/reg-ps.2 >> $TEMP
      ;;
esac
ps2pdf -sPAPERSIZE=letter $TEMP $EMAIL
lpr -#"$copies" -r  $TEMP





More information about the ubuntu-users mailing list