How can I get the length of all arguments given to a function in bash? -


i'd length of string when use "$*" in function.

i tried:

echo ${#"$*"} 

and

echo ${#"*"} 

both gave me bad substitution error.

i don't think can in single command. however, seems work:

#!/bin/bash a="$@" echo "${#a}" 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -