Bashã®ãã©ã¡ã¼ã¿å±éã¯ããã«å¿ãã¦ãã¾ãã®ã§ã¡ã¢ã å¤æ°ã®æåæ° ${#parameter}ã§å¤æ°ã®æåæ°ã調ã¹ããã¨ãã§ãã¾ãã name=/var/log/boot.log echo ${#name} 17 wcãawkã³ãã³ãã使ãæ¹æ³ãããã¾ããã¹ãã¼ãã§ã¯ããã¾ããã*1 $ n=`echo $name | wc -c`; echo $(($n-1)) 17 $ echo $name | awk '{ print length($0)}' 17 é åãåãããã«é åæ°ã調ã¹ããã¨ãã§ãã¾ãã $ array=(a b c d e) $ echo ${array[0]} a $ echo ${#array[@]} 5 å¤æ°ãã©ã¡ã¼ã¿å±é å¤æ°ãåãåºãã¾ãããã¡ã¤ã«åããã£ã¬ã¯ããªåãç°¡åã«åãåºããã¨ãã§ãã¾ãã $ name=/var/log/boot.log $ echo
{{#tags}}- {{label}}
{{/tags}}