[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FW: How to tell Pre commit script the exact File Name containing Spa

From: Russ Sherk
Subject: Re: FW: How to tell Pre commit script the exact File Name containing Spaces?
Date: Fri, 1 Apr 2005 09:26:53 -0500

(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 "$@"
echo $i

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
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]