when i try to echo $10 it becomes echo $1 0

Doboy picture Doboy · May 27, 2011 · Viewed 7.7k times · Source

given something like this

find -type f -newermt "2011-05-26 15:40:35.088712" | xargs -n 1 bash -c fn=$0; set -- `ls -l $fn`; echo $7 $8 $9 $10;

I expect it to output the content in $10 when i try to echo $10 what really happens is it echos $1 along with 0, how do i make it echo $(10)

Answer

Carl Norum picture Carl Norum · May 27, 2011

You need to use echo ${10} to make that work.