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

javascript - How to process users in one specific order using map o each function? -

java - Two interface have same method name with different return type -

javascript - Linking from page A to a specific iframe on page B -