I was finding length of a variable as below:
`set num=123456`
`echo $num|wc -c`
it returned output as 7 (suppose to return 6)
I did same with printf
`printf "%s" $num|wc -c`
it returned output as 6 ( as expected)
Does echo
considering null character while counting?
is Printf
counting till null character?
what is so special about printf
?