Re: [p4] How to use the -x command line argument?
Sambwise <[email protected]> Tue, 1 May 2018 13:20:02 -0700
| Newsgroups | gmane.comp.version-control.perforce |
|---|---|
| Message-ID | <[email protected]> |
Posted on behalf of forum user 'Sambwise'. Whatever you put in the file will be passed as individual arguments to the p4 command (it will not run the command once per arg -- important distinction). Since "p4 label -d LABEL1 LABEL2 LABEL3" isn't valid syntax for the "label -d" command, you'll get a usage error if you pass a multi-line file in that way. You might be able to use the built in "p4 run" command for this, though -- it's a sort of meta-command whose arguments are commands to run. For example: p4 -F "label -d %label%" labels -e EXPR | p4 -x - run is the sort of thing you could use to delete a bunch of labels matching a particular exp ression. The other option is the "xargs" shell command. (Note that "p4 run" has a performance benefit -- it runs all the commands on the same connection, whereas "xargs" is going to invoke p4 multiple times and establish a new connection for each invocation.) -- Please click here to see the post in its original format: http://forums.perforce.com/index.php?/topic/5711-how-to-use-the-x-command-line-argument _______________________________________________ perforce-user mailing list - [email protected] http://maillist.perforce.com/mailman/listinfo/perforce-user