so I have a line of code like this:
result=`find . -type f -size -1000c -print0 | xargs -0 ls -Sh | head` for i in $result; do item=`wc -c $i` echo $item1 done
this will print out all the files in the current fold that are at most 1000bytes, it has the format like:
size_of the file ./name_of_the_file
but i want to get rid of the "./" symbol, so i try to use "cut"
i want to do something like:
for i in $result; do item=`wc -c $i` item1=`cut -f 1 $item` // this gives me the size item2=`cut -c 7- $item` // this gives me all the character after ./ echo item1, item2 // now make it print done
but i'm getting error like:
cut: 639: No such file or directory
can anyone please give me a hint on this? I appreciate it.