Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
google site



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Display Modes
  #8  
Old 01-12-2010
Registered User
 

Join Date: Dec 2009
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
solution

Hi again, in case anyone was wondering I got a solution from a friend.


Code:
filesize=$(du $FILE | cut -c1-4)

My files are between 1 and 9 MG so there is always the same number of numbers.

Thanks for trying!
Sponsored Links
  #9  
Old 01-12-2010
root cause analyst
 

Join Date: Nov 2008
Location: Amsterdam
Posts: 1,769
Thanks: 5
Thanked 78 Times in 75 Posts
This should work for any number

Code:
filesize=$(du "$FILE" | cut -f1)

  #10  
Old 01-12-2010
Registered User
 

Join Date: Dec 2009
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Awesome, thanks!
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
IF statement syntax in tcsh cineman Shell Programming and Scripting 6 11-03-2009 12:12 AM
Syntax error in tcl/tk code milindb Programming 2 09-30-2009 07:46 AM
syntax error on if statement apenkov Shell Programming and Scripting 6 06-01-2009 12:44 PM
Confirming Syntax - IF statement. Cameron Shell Programming and Scripting 3 03-26-2008 05:31 AM
Need explanation for the syntax(code) chandhar Shell Programming and Scripting 1 03-21-2007 03:59 AM



All times are GMT -4. The time now is 07:37 AM.