4

I am creating a perforce client using

p4 client -o -t old_client new_client

I want to remove the Host variable from the perforce spec. I tried to override the Host value using

p4 -H '' client -o -t old_client new_client

but still the perforce client is getting created taking the Host info from p4 info command. Any idea how I can remove Host parameter. I am doing this programatically. So, opening the client file and removing Host wont work for me.

nik7
  • 3,018
  • 6
  • 25
  • 36

1 Answers1

6

To remove the Host field from the workspace spec, do:

p4 client -o -t old_client new_client | grep -v Host: | p4 client -i

That is, simply grep out the Host field before submitting the client form back to the server.

Bryan Pendleton
  • 16,128
  • 3
  • 32
  • 56