Skip to content

Commit

Permalink
Fixed separation line + added different outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
jlumbroso committed Jun 22, 2022
1 parent f814dfc commit 2a2b2d1
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,18 @@ runs:
# ======
# macro to print a line of equals
# REF: https://stackoverflow.com/a/5799353/408734
# (silly but works)
printSeparationLine() {
str=${1:=}
num=${2:-80}
v=$(printf "%0.s${str}" {1..$num})
echo "${v}"
counter=1
output=""
while [ $counter -le $num ]
do
output="${output}${str}"
counter=$((counter+1))
done
echo "${output}"
}
# macro to compute available space
Expand Down Expand Up @@ -83,6 +89,12 @@ runs:
echo "$ dh -h /"
echo ""
df -h /
echo "$ dh -a /"
echo ""
df -a /
echo "$ dh -a"
echo ""
df -a
printSeparationLine '=' 80
}
Expand Down

0 comments on commit 2a2b2d1

Please sign in to comment.