How to change perforce specs from command line? What I want to do is, i have a workspace whose clobber option is set to noclobber(default value). Now i want to change it to clobber.
I know we can do it directly from p4v, but i dont want that. I also know that if we run 'p4 client' command in cmd, it will open P4CONFIG file in text editor, where we can change noclobber to clobber and save the file and its done, but i also dont want that too.
Please tell me the specific command which directly changes the noclobber to clobber without using p4v or without editing P4CONFIG.txt.
Thanks and Regards, Noob perforce admin
If you're trying to avoid repeatedly opening a text editor, you can accomplish your goal with a little bit of
sed
, like this:Simplest solution:
It's pretty easy to script this with Perl, Python, Ruby, or even Powershell. Here's a one-liner in Powershell:
p4 client -o | %{$_ -replace "noclobber", "clobber"} | p4 client -i