[Ilugc] Need to calculate the file size in shell scripting

  • From: balachandarlinks@xxxxxxxxx (Balachandar)
  • Date: Mon Jan 4 23:36:13 2010

Hi guys,
   I want to get the size of a file in a variable.I want to do arithmetic 
operations on that variable.I used du command.But it's output is like this 
"100    1.txt".
    i dont want any trailing attachments.I only want the file size.Any help ??  

--with regards,
  Balachandar.K.M
  http://infoqueue.wordpress.com

Other related posts: