Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 2
    -1 This answer is very misleading, following on from the question’s misleading title. -f has nothing to do with if; it is an option for the [ command, which just happens to be called using an if statement here. Also, it just so happens that [ (along with if) is built in to bash. Commented Mar 26, 2022 at 12:48
  • Yeah, agree that this is a terrible answer. If you run man [ in a linux terminal, you'll see that -f is an option of the [ operator. From there it's apparent what -f does. Commented Oct 4, 2023 at 16:35