![]() |
|
|
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 |
| Trouble with awk | RichieFondel | Shell Programming and Scripting | 1 | 01-17-2008 07:30 AM |
| [question] hard exercise, help needed | EnioMarques | UNIX for Dummies Questions & Answers | 2 | 09-20-2007 11:22 PM |
| X trouble | izua | UNIX for Dummies Questions & Answers | 0 | 01-03-2007 06:19 PM |
| The trouble with... | zazzybob | What's on Your Mind? | 6 | 01-18-2005 06:01 AM |
| NIS trouble | farzolito | UNIX for Advanced & Expert Users | 10 | 12-10-2001 04:44 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hello guys.. well, im kinda newbie with unix because i started to learn it like 2 weeks ago. then i started to make some exercises, but i got stucked on this one : Quote:
i was trying with a "cut -d'|' -f5 filename | sort;" , but it only returns me all 5th field names ordered. then i talked with few friends, they told me to use the awk command, i tried to read few manuals but i couldn't make it. so, i would be grateful if anyone could help me with it. thanks and btw, sorry my bad english Enio. UPDATE well, i kept trying with the awk and got the different methods name on 5th field with : Code:
awk -F'|' '{print $5}' file1 | sort | uniq;
now i "just" need to know how many times they appear =/ Last edited by EnioMarques; 09-15-2007 at 05:23 PM.. |
|
||||
|
wow thanks a lot dude but can you explain me how you did it??I wanna know how you used those indexes. and can you give me a hand on exercise B too?? i need to know the total of ERRORS and SUCCESS.Success transactions are logged with the word INFO in the beginning of the line and and error transactions are with a ERROR instead. i used a Code:
grep -C INFO file1; grep -c ERROR file1; to know the total of errors and succes at the total,but now i need for each sub method =/ thanks in advance Last edited by EnioMarques; 09-16-2007 at 02:59 PM.. |
|
||||
|
ya i know, but i need to complement that A) exercise.
when i use vgersh99's code i get like : [SubMethod1] appeared 100 times [SubMethod3] appeared 123 times [SubMethod2] appeared 15 times for B) i need like.. [SubMethod1] appeared 100 times with 3 errors and 97 successful [SubMethod2] appeared 123 times with 3 errors and 120 successful [SubMethod3] appeared 15 times with 5 errors and 10 successful |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|