How would you write a test that says “if /tmp/foo is a directory or USERS is greater than 5”?

How would you write a test that says “if /tmp/foo is a directory or USERS is greater than 5”?Category: Linux EssentialsAuthor "LinuxQuestions"How would you write a test that says “if /tmp/foo is a directory or USERS is greater than 5”?
Linux Questions Staff asked 1 year ago

How would you write a test that says “if /tmp/foo is a directory or USERS is greater than 5”?

  • test –d /tmp/foo | $USERS > 5
  • test –f /tmp/foo –o $USERS –ge 5
  • test –d /tmp/foo –o $USERS –gt 5
  • test /tmp/foo || $USERS > 5
  • test /tmp/foo –d –o $USERS -gt 5

About the author