Advertisement
teknoraver

bash length

Mar 30th, 2019
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.23 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. i=0
  4. max=100000
  5. string=$(seq -s '' 1000)
  6.  
  7. if [ "$1" = len ]; then
  8.     while [ $i -lt $max ]; do
  9.         [ -z "$string" ]
  10.         i=$((i+1))
  11.     done
  12. else
  13.     while [ $i -lt $max ]; do
  14.         [ "${#string}" -ne 0 ]
  15.         i=$((i+1))
  16.     done
  17. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement