|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 !! |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
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
|
|||
|
|||
|
This should work for any number Code:
filesize=$(du "$FILE" | cut -f1) |
|
#10
|
|||
|
|||
|
Awesome, thanks!
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
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 |