All pastes #954782 Raw Edit

Something

public shellscript v1 · immutable
#954782 ·published 2008-03-24 02:52 UTC
rendered paste body
read -p " Welcome to Melanie's checkbook script. Please set the active year " yread -p "The active year is currently $y . If you would like to add a record to the active year, enter a. If you would like to display the records from the active year, enter d. If you would like to set a new active year, enter y. If you would like to save a record, enter s. If you wish to exit, enter e." adysecase $adyse ina) read -p "Please enter the amount." aecho "Amount: $a" >> $y.txtread -p "Please enter the ID." iecho "ID: $i" >> $y.txtread -p "Please enter the date." decho "Date: $d" >> $y.txtread -p "Please enter some details." techo "Details: $t" >> $y.txtecho "Record: 0" >> $y.txtread -p "Please enter the type." pecho "Type: $p" >> $y.txt | more ;;d) echo "Here are the records from $y ." cat $y.txt || echo "No records from $y are available." | more ;;y) read -p "Specify the new active year." y | more ;;s) read -p "Save file as? " ftouch $f.txt || touch acct.sh | more ;;e) echo "Goodbye!"exit ;;*) read -p "The active year is currently $y . If you would like to add a record to the active year, enter a. If you would like to display the records from the active year, enter d. If you would like to set a new active year, enter y. If you would like to save a record, enter s. If you wish to exit, enter e." ;;esac$ . checkbook.sh Welcome to Melanie's checkbook script. Please set the active year 08The active year is currently 08 . If you would like to add a record to the active year, enter a. If you would like to display the records from the active year, enter d. If you would like to set a new active year, enter y. If you would like to save a record, enter s. If you wish to exit, enter e.dThe active year is currently 08 . If you would like to add a record to the active year, enter a. If you would like to display the records from the active year, enter d. If you would like to set a new active year, enter y. If you would like to save a record, enter s. If you wish to exit, enter e.a:: marshallm@Net212s [~]:::$