[p4] Changing owenr for multiple client specs
Mohsin Saleem Khan
MKhan at LMKR.COM
Thu Nov 30 07:33:12 PST 2006
It works like magic, thanks. I think I m really getting old :(
Regards
Mohsin Saleem Khan
"David Weintraub" <qazwart at gmail.com>
11/30/2006 08:02 PM
To
"Mohsin Saleem Khan" <MKhan at lmkr.com>
cc
perforce-user at perforce.com
Subject
Re: [p4] Changing owenr for multiple client specs
> cat testmesed | sed 's/Owner: mshaaf/Owner: mkhan/'
What are you getting? We need to know exactly what you're expecting,
and what you were getting.
First of all, you could simply do this:
$ sed 's/Owner: mshaaf/Owner: mkhan/' testmesed
And, save yourself some typing.
Next, between "Owner:" and "mshaaf", is that a tab or a single space?
If it is a space, it won't work because Perforce puts a tab in there.
Now, I think what you really want to do is something like this:
$ p4 client -o <client> | sed 's/^Owner:.*$/Owner: mkhan/' | p4 client
-i
or for your test:
$ p4 client -o <client> | sed 's/^Owner:.*$/Owner: mkhan/' | tee
client.out
Then you can examine the "client.out" file to see if it is what you want.
The "^Owner:.*$" says to match a line that begins with "Owner:". The
".*$" matches the rest of the line. The "s" command in sed is a
substitution command, so you're replacing the selected line with
"Owner: mkhan".
On 11/30/06, Mohsin Saleem Khan <MKhan at lmkr.com> wrote:
> Hi ,
>
> Some one ( a very good person) send me a sed on liner to change client
> Owner value in multiple client specs in a single go. Can any one has any
> idea what I may be missing. I am not v good with sed
>
> cat testmesed | sed 's/Owner: mshaaf/Owner: mkhan/'
>
> Regards
>
> Mohsin Saleem Khan
>
> LMK Resources
> Tele: +92 51 111 101 101 (264)
> Cell: +92 333 4154844
> Fax: +92 51 287 9854
> Email: mkhan at lmkr.com
> http://www.lmkr.com
> _______________________________________________
> 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