Searching specific fields
To search based on the values in a specific field, specify
field=value
.
Example Finding jobs that contain words in specific fields
Bruno wants to find all open jobs related to filtering. He types:
p4 jobs -e 'Status=open User=bruno filter.c'
This command finds all jobs with a Status:
of
open
, a User:
of bruno
, and the
word filter.c
in any non-date field.
To find fields that do not contain a specified expression, precede it
with ^
, which is the NOT operator. The NOT operator
^
can be used only directly after an AND expression (space
or &
). For example, p4 jobs -e
'^user=bruno'
is not valid. To get around this
restriction, use the *
wildcard to add a search term before
the ^
term; for example: p4 jobs -e 'job=*
^user=bruno'
returns all jobs not owned by Bruno.
Example Excluding jobs that contain specified values in a field
Bruno wants to find all open jobs he does not own that involve filtering. He types:
p4 jobs -e 'status=open ^user=bruno filter'
This command displays all open jobs that Bruno does not own that
contain the word filter
.