![]() |
|
|
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 |
| checking directory size in the text file | G.K.K | Shell Programming and Scripting | 5 | 09-25-2008 11:23 AM |
| Compare date of file and directory | odd_r | Shell Programming and Scripting | 2 | 08-26-2008 10:39 AM |
| How to know size of file in a directory | kittusri9 | Shell Programming and Scripting | 1 | 04-28-2008 09:43 AM |
| compare file size from a output file from a script | moustik | Shell Programming and Scripting | 7 | 11-07-2007 10:17 AM |
| How to compare file size after ftp? | icemania | Shell Programming and Scripting | 1 | 07-10-2007 12:17 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to compare size of two file which is in one directory
I have two file in a Directory.I want a script which will compare the Size of Two file.
Can Anyone Help me on this: linasplg11:/opt/dataout/kk/linasplg11 # cat size -rwxrwxrwx 1 root root 16658 Jan 8 13:58 lina_IP_SIP_1231325621210.xml -rwxr-xr-x 1 root root 16672 Jan 8 14:30 lina_IP_SIP_1231326111273.xml |
|
||||
|
counter=0
cat size | while read a do if [ counter="1" ] then cmp2=`echo $a | awk -F " " '{print $5}'` fi else cmp1=`echo $a | awk -F " " '{print $5}'` elif counter=`expr{counter+1}` done if (cmp1 > cmp2) {your code| else { your code } fi bye bye |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|