Get view of a client in perforce through command line

790 Views Asked by At

We can know the information about a client using

p4 client -o *clientname*

but it gives a lot of information. Is there any way to get only the view of the client using command line?

1

There are 1 best solutions below

0
On

You can use p4's -z tag option to get annotated output useful for scripting. From there, you can extract the lines that start with ... View using grep and cut:

p4 -z tag client -o | grep -E '^[.]{3} View' | cut -d ' ' -f 3-

(And if you're using Windows, you can obtain grep and cut implementations from UnxUtils.)