readded udpated scripts directory
This commit is contained in:
parent
cd053a412a
commit
f3117c81d9
84 changed files with 3210 additions and 0 deletions
19
scripts/scriptbc
Executable file
19
scripts/scriptbc
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
# scriptbc--Wrapper for 'bc' that returns the result of a calculation
|
||||
# this script was taken from the Wicked Cool Shell Scripts book, page 35
|
||||
|
||||
if [ "$1" = "-p" ] ; then
|
||||
precision=$2
|
||||
shift 2
|
||||
else
|
||||
precision=2 # Default
|
||||
fi
|
||||
|
||||
bc -q -l << EOF
|
||||
scale=$precision
|
||||
$*
|
||||
quit
|
||||
EOF
|
||||
|
||||
exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue