add some stuff from RC machine config

This commit is contained in:
Mia Steinkirch 2019-06-21 16:07:46 -07:00
parent 7095235fe8
commit 54e3254e41
44 changed files with 23 additions and 8 deletions

View file

@ -1,30 +0,0 @@
# awk -f math2
BEGIN {
myprompt = "(To Stop press CTRL+D) > "
printf "Welcome to MyAddtion calculation awk program v0.1\n"
printf "%s" ,myprompt
}
{
no1 = $1
op = $2
no2 = $3
ans = 0
if ( op == "+" )
{
ans = $1 + $3
printf "%d %c %d = %d\n" ,no1,op,no2,ans
printf "%s" ,myprompt
}
else
{
printf "Opps!Error I only know how to add.\nSyntax: number1 + number2\n"
printf "%s" ,myprompt
}
}
END {
printf "\nGoodbye, %s\n !" , ENVIRON["USER"]
}