[p4] Using "^" (carrots) in client spec names

David Weintraub qazwart at gmail.com
Wed May 2 08:50:58 PDT 2007


Are you on a PC by any chance? I bet you are. Try this

prompt> echo client^spec^name

And see what you get.

The caret symbol is like a backslash character on Unix systems. It
quotes the next character. For example:

prompt> echo this is a ^> test

will echo "this is a > test" onto the command line while

prompt> echo this is a > test

will echo "this is a" into a file called "test".

Try doubling up the carets and see if that helps:

prompt> set P4CLIENT=client^^spec^^name
echo "%P4CLIENT%"
"client^spec^name"

(Note the quotation marks!)

On 5/2/07, Looney, James B <james.b.looney at lmco.com> wrote:
> We have a script that does some data mining based on the client spec
> names, so we need a delimiter.  Our client spec names are based on a
> directory structure, so we have to be careful not to use characters
> commonly found in directory names.  I finally thought of a ^ ( carrot ).
>
>
> So, I try the following:
> p4 client client^spec^name
> p4 -c client^spec^name <add/open/whatever...I mess around a bit with it>
>
> The above seems to work.  So, to make my life easier, I switch over to
> using the config file containing:
> P4CLIENT=client^spec^name
>
> This results in:
> p4 where .
> . - must refer to client 'client^spec^name'.
>
> Does anyone know what that means?  It almost seems like its trying to
> interpret the ^ as the shell might.  If I use the same command with a
> non-^ delimted spec name, it works.  Thoughts?
>
> Thanks,
> -JB
> _______________________________________________
> 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