I'm writing a bash script that needs to perform some operation on an argument which is a path The path may or may not correspond to an existing file on the user's system, so I'd like to test whether the argument looks on its face like it fits the format of a path, in a way that doesn't rely on testing for some existing file.
I hope that there is some way to do this without a regex or other pattern-matching; I'd be afraid of missing some bizarre edge case -- ideally I want to know if there is some bash builtin or something of the sort that will do this test for me.