![]() |
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 |
| Simple Script | mojoman | Shell Programming and Scripting | 6 | 05-12-2008 03:55 AM |
| simple script help | ali560045 | Shell Programming and Scripting | 4 | 01-24-2008 05:24 AM |
| simple script | ali560045 | Shell Programming and Scripting | 1 | 01-22-2008 04:41 AM |
| Simple Script Help | Skunkie | UNIX for Dummies Questions & Answers | 4 | 10-02-2006 11:18 AM |
| simple script | hedrict | UNIX for Dummies Questions & Answers | 4 | 02-23-2004 04:15 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|