Skip to content

Commit

Permalink
fixed linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
brute-force committed Aug 30, 2019
1 parent 695a297 commit 3722681
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions System/totp.30s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ else
echo "my codes"
echo "---"

/usr/local/bin/ykman oath code | while read line
/usr/local/bin/ykman oath code | while read -r line
do
account=$(echo $line | cut -d':' -f1 )
code=$(echo $line | sed 's/.*\([0-9]\{6\}\)$/\1/')
account=$(echo "$line" | cut -d':' -f1 )
code=$(echo "$line" | sed 's/.*\([0-9]\{6\}\)$/\1/')

# align left with padding
numspaces=`expr 19 - ${#account} + 1`
padding=$(printf '%*s' "$numspaces")
numspaces=$((20-${#account}))
padding=$(printf "%*s" "$numspaces" "")
item="$account $padding $code"

echo "$item | color=orange font=Menlo size=12 bash='$0' param1=copy param2=$account param3=$code refresh=true terminal=false"
Expand Down

0 comments on commit 3722681

Please sign in to comment.