![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simple Script | mojoman | Shell Programming and Scripting | 6 | 05-12-2008 12:55 AM |
| simple script help | ali560045 | Shell Programming and Scripting | 4 | 01-24-2008 01:24 AM |
| simple script | ali560045 | Shell Programming and Scripting | 1 | 01-22-2008 12:41 AM |
| Simple Script Help | Skunkie | UNIX for Dummies Questions & Answers | 4 | 10-02-2006 08:18 AM |
| simple script | hedrict | UNIX for Dummies Questions & Answers | 4 | 02-23-2004 12:15 PM |
|
|
LinkBack | Thread Tools | Display Modes |
| Forum Sponsor | ||
|
|
|
||||
|
I took your data
1 270199 2812 Sun Jan 23 16:13:33 2005 Gaining_skills.loc 2 270190 2113 Sun Jan 23 16:13:33 2005 User_Concept.loc 3 270235 1608 Sun Jan 23 16:13:33 2005 Red_Hat.loc 4 270236 1606 Sun Jan 23 16:13:33 2005 UNiX_FreeBSD.loc 5 270234 1283 Sun Jan 23 16:13:33 2005 Linux_distributions.loc into file2 and did some thing like this. Code:
awk '
BEGIN { printf("%2s %6s %4s %-24s %s\n","No","Inode","Size","Date","Name");
printf("-----------------------------------------------------------\n"); }
{ print $0 }
' file2
|
|
||||
|
this is what I tried amongst a few other combinations : no go!
can you give an example of the code? here is what I have! 1 #!/bin/bash 2 #.filer2 3 find $1 -type f -printf "%i\t%s %c %f\n" | egrep -v '(.date.*|foo|temp|file*)'| sort -n -r +1 | awk '($2 != 0)' | awk ' 4 BEGIN { printf("%2s %6s %4s %-24s %s\n","No","Inode","Size","Date","Name"); 5 printf("-----------------------------------------------------------\n");} 6 {tot=i; i<=NR; i+=$2}END{print "Total="tot}{print NR, $0}' | column -t edit: this is what I keep getting anyway! No Inode Size Date Name ----------------------------------------------------------- 1 270199 2812 Sun Jan 23 16:13:33 2005 Gaining_skills.loc 2 270190 2113 Sun Jan 23 16:13:33 2005 User_Concept.loc 3 270235 1608 Sun Jan 23 16:13:33 2005 Red_Hat.loc 4 270236 1606 Sun Jan 23 16:13:33 2005 UNiX_FreeBSD.loc 5 270234 1283 Sun Jan 23 16:13:33 2005 Linux_distributions.loc Total=8139
__________________
moxxx68 http://www.estarinformado.com.ar/apicmaxmiel/bee-diez.gif |
||||
| Google UNIX.COM |