I have a file named "testfile"
I launch command find -name testfile -exec bash -c 'file $0' {} \;
This command works, but find -name testfile -exec bash -c 'file $1' {} \; does not.
I always thought $0 expanded to command itself and $1 expanded to first arggument. Isn't it supposed to be that $0 is file command itself and $1 have to be it's argument and in my example it's the value of {}? What i'm missing?
findshould have the starting path! Like this:find /path -name filename....– Romeo Ninov Dec 06 '23 at 13:14