[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FW: FW: How to tell Pre commit script the exact File Name containing Spa
FW: FW: How to tell Pre commit script the exact File Name containing Spaces?
Sat, 2 Apr 2005 09:36:02 +0530
Thanks Russ, (Sorry Russ please ignore previous mail)
>>You can test this by creating a script with the above as contents.
>>Run it with args: a b "b a". Then remove the quotes from the $@ ant
>>try it again with the same args to see what (ba)sh does to the args.
But my script is getting from CVS server is a b c not a "b c"
That is why for I in "$@" not helped me....
Let two files named as a and "b c" then CVS server send to my script is a b c
not a "b c" ...
I think I need to modify slightly in CVS code so that Pre-commit script will
get files surrounded by double quotes but I am not known to CVS code ??
If anybody has the same problem or can guide me where to start...
From: Russ Sherk [mailto:address@hidden
Sent: Friday, April 01, 2005 7:57 PM
To: Paras jain
Subject: Re: FW: How to tell Pre commit script the exact File Name containing
(sorry for double post Paris, forgot to copy the group)
Not really a cvs question but if you put quotes around the $@, it will work.
for i in "$@"
You can test this by creating a script with the above as contents.
Run it with args: a b "b a". Then remove the quotes from the $@ ant
try it again with the same args to see what (ba)sh does to the args.
On Apr 1, 2005 8:30 AM, Paras jain <address@hidden> wrote:
> Dear List,
> When I commit a file (which is having spaces in it's name), CVS checks for
> any pre commit scripts and passed arguments to that scripts which includes
> the file names to be checked in.
> Now I want to parse those file names in my Pre commit scripts but because
> file name contains spaces, I could not parse the exact file names! If a file
> name is "DRN 106.doc" I will get there DRN and 106.doc. I am parsing the
> file names in my pre commit scripts as "for file in $@"..... And I get DRN
> first and then 106.doc, but I want DRN 106.doc?
> Is there any way to tell pre commit script the exact file names with spaces?
> Am Using CVS 1.11.17 on LINUX ES 3.
> Best Regards
> Paras Jain
> Info-cvs mailing list
- FW: FW: How to tell Pre commit script the exact File Name containing Spaces?,
Paras jain <=