-2

I think [ ! -f $2 ] means

$2 file doesn't exist.

is it correct?

I'm pretty sure [ ! -f ] means file doesn't exist. but I'm not sure for $2.

give me some help.

YOUNG
  • 21

1 Answers1

4

[ is test, and man test tells us:

  -f FILE
         FILE exists and is a regular file

so, well, your $2 is the filename, the second parameter to the script you're in.