Register
It is currently Mon Dec 22, 2014 12:44 pm

bfcalc - A board footage calculator for lumber


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Tue May 17, 2005 8:20 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 673
Location: Des Moines, Iowa
Code:
#!/bin/bash
#
##########################
# USA Linux Users Group  #
# http://www.usalug.org  #
# http://bashscripts.org #
##########################


########################################################
#  Board Footage Calculator - For Lumberyards          #
########################################################
#
#
#
#    FILE: bfcalc
# VERSION: 0.1
#    DATE: January 4, 2005
#
#  AUTHOR: Dave Crouse <dave NOSPAMat usalug.org>
#          PO Box 3210
#          Des Moines, IA 50316-0210
#          United States
#
# Copyright (C) 2005
# Dave Crouse <dave NOSPAMat usalug.org>
# All rights reserved.
#
########################################################


#########################################################################
#  This software is licensed under the GPL - GNU General Public License #
#########################################################################
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc.
# 59 Temple Place, Suite 330
# Boston, MA  02111-1307  USA
#
###################################################################


#######################################################
# This is the sandbox area - testing script functions #
# and other misc NOTES on this project                #
#######################################################
#
# TxWxL/12=bf
# (echo scale = 4; echo 23/47) | bc
#
##########################################
##         end of sandbox area          ##
##########################################


######################
# Start of Variables #
######################
#
#
#
#
######################
# End of Variables   #
######################


######################
# Start of Functions #
######################
#
#

board_feet ()
{
echo "This program figures the board feet in a board"
echo "Using the forumla TxWxL/12=bf"
echo "To end this program use CTL-C"
echo " "
while [ "$var1" != "n" ]
do
read -p "Please enter thickness in inches: " thickness
read -p "Please enter width in inches: " width
read -p "Please enter length in feet: " feet
subt=$thickness*$width*$feet
echo " "
echo "This board contains"
(echo scale = 4; echo $subt/12) | bc
echo "board feet."
echo " "
read -p "Would you like to do another calculation (y/n)?  " var1
done
}

#
#
####################
# End of Functions #
####################


###########################
# Program run starts here #
###########################

clear
board_feet
exit



Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP