Facebook
From emOfthewodl.world., 7 Years ago, written in Bash.
Embed
Download Paste or View Raw
Hits: 258
  1. f=1
  2. read x
  3. if [ "${x:1}" == "+" ]
  4. then
  5. f=0
  6. x=${x,,}
  7. fi
  8.  
  9. while read s
  10. do
  11. if [ $f == 1 ]
  12. then
  13. s=${s,,}
  14. fi
  15. s=${s//[^$x]}
  16. echo ${#s}
  17. done
  18. //bashlinux