Robin Gerard wrote:

On Wed, Jul 09, 2003 at 05:32:25PM -0700, Vineet Kumar wrote:


* David selby ([EMAIL PROTECTED]) [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.



Hi!
the $filename is used in shell script like the following

for filename in /home/foo do
   stat -c %y $filename

--
Zhao YouBing, Ph.D student
State Key Lab of CAD&CG,Zhejiang University,
Hangzhou, 310027, P.R.China
Tel  : 0571-87951045(O), 87933444(H)
Email: [EMAIL PROTECTED]
MSN  : [EMAIL PROTECTED]



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Reply via email to