[p4] p4 -x- flag with client -d?
David Weintraub
qazwart at gmail.com
Thu Mar 29 16:44:31 PST 2007
On 3/29/07, Ken Williams <ken.williams at thomson.com> wrote:
> cat obsolete_clients_list.txt | xargs p4 client -d
"xargs" will not work as you shown because "xargs" loads up as many
parameters as it can on the command line, before running the command.
Try this:
$ cat word_list.txt | xargs echo
Or even better:
$ xargs /bin/echo < word_list.txt
You'll see that the xargs command combines the lines from
"word_list.txt" before echoing them.
A few versions of the "xargs" command allow you to specify the number
of words allowed before running the command. On BSD systems, you can
do this:
$ xargs -n1 client -d < obsolete_client_list.txt
On Linux systems its:
$ xargs --max-args=1 client -d < obsolete_client_list.txt
>
>
>
> On 3/29/07 12:18 PM, "Melissa Kacher" <mkacher at msn.com> wrote:
>
> > You can only delete one client at a time. You have to run "p4 client -d" n
> > times to delete n clients. You are only running the command once, with all
> > of your clients on the same command line.
> >
> > So you need something like:
> > for /f %%x in (obsolete_clients_list.txt) do p4 client -d %%x
> > But I haven't tested this for syntax correctness.
>
> Or on unix:
>
> cat obsolete_clients_list.txt | xargs p4 client -d
>
> -Ken
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
--
--
David Weintraub
qazwart at gmail.com
More information about the perforce-user
mailing list