Guest User

Untitled

a guest
Feb 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. # How to figure out the length of a strign in bash?
  2. #expr length
  3. expr length "string" #This works on Ubuntu, but not on Mac
  4.  
  5. #wc -c
  6. echo -n "string" | wc -c # -n not to output trailing newline in echo
Add Comment
Please, Sign In to add comment