![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Print last occurrence if first field match | Raynon | Shell Programming and Scripting | 9 | 03-13-2008 03:28 AM |
| Egrep cheat sheet anywhere? Looking for meaning of egrep -c | leelm | UNIX for Dummies Questions & Answers | 2 | 01-11-2008 03:37 PM |
| Compare dates in a field and print the latest date row | cvkishore | Shell Programming and Scripting | 1 | 08-04-2007 08:58 AM |
| regexp to print after a field seperator | ramky79 | Shell Programming and Scripting | 7 | 05-09-2007 07:31 PM |
| Moving Part of a field to another field using AWK | rjsha1 | Shell Programming and Scripting | 5 | 08-04-2006 06:39 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
egrep field print
Code:
#!/bin/bash
dnum=0
cd rc.d
while [ $dnum -le "6" ]
do
echo "rc$dnum.d outputs"
egrep -r '^[K|S][0-9][0-9][a-z]+' rc$dnum.d | sort -n +3
((dnum++))
done
WHAT I GET> rc0.d outputs rc0.d/tmpfiles:K00linuxconf rc0.d/tmpfiles:K01a1nono... WHAT I'D LIKE> rc0.d K00linuxconf K01a1nono help?? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|