Re: Command touch and irregular file names

2007-08-16 Thread Tong Sun

--- Brian Dessent [EMAIL PROTECTED] wrote:

 You can do:...

Thanks for the comprehensive solution. 

  I think if the touch command uses the standard gnu getopt lib, then
  the above code should work, shouldn't it?
 
 I don't think it should...

My silly mistake, I put the -- at the wrong spot. :-)

cheers




  

Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel 
and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Command touch and irregular file names

2007-08-15 Thread - Tong -
Hi, 

How to let command touch to work with irregular file names?

In my script I have 

 touch -r $file1 $file2

the file1/2 can be anything file, ../path/file, /root/file, etc.

The problem is when file1/2 are irregular file names. E.g., -test.file1/2.

I.e., anyway to make the following touch command works?

 $ touch -r -test.file1 -test.file2
 touch: invalid date format `est.file2'

FYI, I tried this but didn't work:

 $ touch -r -- -test.file1 -test.file2
 touch: invalid date format `est.file1'

I think if the touch command uses the standard gnu getopt lib, then
the above code should work, shouldn't it?

Thanks

tong



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils