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

Re: bash: get file modification time query



On Fri, Jul 11, 2003 at 01:00:19AM +0000, Robin Gerard wrote:
> On Wed, Jul 09, 2003 at 05:32:25PM -0700, Vineet Kumar wrote:
> > * David selby (debian@pusspaws.net) [030709 12:08]:
> > > Is there a neater way to get a modification date for a file without ls 
> > > -l & sed ? I have a bash script that needs to get the info. Because the 
> > > file size varies I cannot use cut, it may cut the wrong bit.
> > 
> > stat -c "%y" $filename
> for me: 
> stat -c "%y" filename works but stat -c "%y" $filename doesn't.

$filename or ${filename} is substituted for the contents of environment
variable 'filename'. 

-- 
hugh



Reply to: