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

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

Maven Javadoc 'Cannot find default setter' and fails -