0

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?

muru
  • 72,889
xycainoff
  • 23
  • 4

0 Answers0