I want to find the parent of a checked out file in ClearCase from a Bash script. For example, if I type ct ls
I get this:
$ ct ls some_file
some_file@@/main/some/branch/CHECKEDOUT from some_file@@/main/some/branch/6 Rule: CHECKEDOUT
I want to find the parent version (some_file@@/main/some/branch/6
) from a script. Sure I can use awk or similar text processing tools, but I think that's a very ugly solution, and can easily break for more exotic file names (for example if it has spaces or the string "from" in it).