string - Substitute double with single quotes -
i need evaluate length of every filename in directory. here's do:
files=$(ls -q) file in $files; echo lenght: ${#file} done
but length calculated double-quotes (+2). how can escape that?
don't parse output of ls
, use wildcard , for
:
for file in * ; echo "$file: ${#file}" done
Comments
Post a Comment