[p4] ztag and grep, discovering and printing string

Elliott Lock <[email protected]> Sun, 15 Apr 2018 09:25:01 -0700
Newsgroups gmane.comp.version-control.perforce
Message-ID <[email protected]>
Posted on behalf of forum user 'Elliott Lock'.

Hi all,

I'm running the following command:

p4 -ztag -F "%depotFile%;%rev%;%line%;%rev%" grep -a -n -s -e
"Nothing" "//streams/dev/server/ReadMe.txt"

Which produces this:
//streams/dev/server/ReadMe.txt;3;1;3
//streams/dev/server/ReadMe.txt;1;1;1

This is great but I'm missing one bit of information which is I'd like
to see the string for the line in question. For example, running without ztag
as:
p4 grep -a -n -s -e "Nothing"
"//streams/dev/server/ReadMe.txt"

Would produce:

//streams/dev/server/ReadMe.txt#3:1:Nothing
//streams/dev/server/ReadMe.txt#1:1:Nothing to see here  :)

It's the last section I require.

Many Thanks



--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/5689-ztag-and-grep-discovering-and-printing-string
_______________________________________________
perforce-user mailing list  -  [email protected]
http://maillist.perforce.com/mailman/listinfo/perforce-user