![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| filesize | infyanurag | Shell Programming and Scripting | 3 | 05-15-2008 05:00 AM |
| Not able to see the inputted command on the shell prompt..but its executing the comnd | Crab | High Level Programming | 3 | 09-20-2006 07:39 AM |
| How to hide user inputted text for interactive unix shell script? | patrickpang | Shell Programming and Scripting | 1 | 04-04-2006 08:42 PM |
| FileSize ??? | Cameron | Shell Programming and Scripting | 3 | 05-28-2002 10:34 PM |
| filesize | jmg5 | Shell Programming and Scripting | 2 | 02-13-2002 07:51 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How do I compare a filesize to an inputted number?
I need to create a shell script that takes 2 arguments, the first argument is any number, and the second argument is a filename. The script needs to indicate if the file's size is bigger or smaller than the number provided.
I know it will be some kind of if/then, but I can't figure out how to set up the if statement to compare $1 to the file size of $2. Any help is much appreciated. Thanks guys! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|