Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
22
Task/Introspection/UNIX-Shell/introspection-1.sh
Normal file
22
Task/Introspection/UNIX-Shell/introspection-1.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
case ${.sh.version} in
|
||||
*93[[:alpha:]]+*) :;; #this appears to be ksh93, we're OK
|
||||
*) echo "version appears to be too old"
|
||||
exit # otherwise, bail out
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ -z ${bloop+bloop has a value} ]]; then
|
||||
print "no bloop variable"
|
||||
elsif (( abs(1) )); then
|
||||
print -- $(( abs(bloop) ))
|
||||
fi
|
||||
|
||||
typeset -a int_vars
|
||||
set | while IFS='=' read -r var value; do
|
||||
if [[ $value == +([[:digit:]]) ]]; then
|
||||
int_vars[n++]=$var
|
||||
let sum += $value
|
||||
fi
|
||||
done
|
||||
print "${int_vars[*]}"
|
||||
print -- $sum
|
||||
Loading…
Add table
Add a link
Reference in a new issue