help in awk report


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting help in awk report
# 1  
Old 04-29-2009
help in awk report

home directory = /export/home/jenovaux/
/log
Contain 3 file
/filename1.log
/filename2.log
/filename3.log
each file from this file is a log for job
each file contain success or failed

I want to make awk report as the following:-

LOGFILENAME STATUS
# 2  
Old 04-29-2009
try this

awk 'BEGIN{print LOGFILENAME STATUS}
$0 ~ /success/{print FILENAME, SUCCESS}
$0 ~ /failed/{print FILENAME, FAILED}
' filename1.log filename2.log filename3.log

cheers,
Devaraj Takhellambam
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

awk use to generate report

Hi , In a directory list of ddl files are stored in the given format above. Above is the sample ddl file. The ddl file name is same as that of table name ie email_notifications.ddl I want to generate below report using awk utility reading all the ddl files stored in /ddl path Desired output:... (1 Reply)
Discussion started by: vedanta
1 Replies

2. Shell Programming and Scripting

Need to create a report using paste or with awk

Input file will be Name: serve1 has disk :Yes dev (8): Name: serve2 has disk :No dev (8): Name: serve3 has disk :No Name: serve4 has disk :Yes dev (8): Need output like that. I was using pate -d, - - - . But that need all the line in same format in this some server it has... (4 Replies)
Discussion started by: ranjancom2000
4 Replies

3. Shell Programming and Scripting

awk and seen to report duplicates

I have this file: @Muestra-1 agctgcgagctgcgacccgggttatataggaagagacacacacaccccc + !@$#%^&*()@^#&HH!&*(@&#*(FT^%$&*()*&^%@ @Muestra-2 agctgcgagctgcgacccgggttatataggaagagacacacacaccccc + !@$#%^&*()@^#&HH!&*(@&#*(FT^%$&*()*&^%@ @Muestra-3 agctgcgagctgcgacccgggttatataggaagagacacacacaccccc +... (4 Replies)
Discussion started by: Xterra
4 Replies

4. Shell Programming and Scripting

Help with awk command on report with headings

Hi all, I have a report that looks like this: ------------------------------------------------- -- AOC - XXXXXXX -- ------------------------------------------------- Thread Last Sequence Received Last Sequence Applied Difference ----------... (12 Replies)
Discussion started by: cougartrace
12 Replies

5. Shell Programming and Scripting

Report from Log file using awk

Hi Gurus, I've log files like below: extint.performance.log.2014-04-10-00-00-00.13 extint.performance.log.2014-04-11-00-00-00.12 extint.performance.log.2014-04-12-00-00-00.12 extint.performance.log.2014-04-12-14-35-11.11 extint.performance.log.2014-04-13-00-00-00.10... (4 Replies)
Discussion started by: VasuKukkapalli
4 Replies

6. Shell Programming and Scripting

Formatting a report using awk

Our vendor produces a report that I would like to format in a particular way. Here is the sample output from their report: # AA.INDEX 2 11 2 239 52 (7,2) 07 MAY 11 203.1 55 # ACCOUNT 2 89561 2 ... (4 Replies)
Discussion started by: thaller
4 Replies

7. Shell Programming and Scripting

Awk Help for extracting report from logs

Hi I have a log file, with lines of following kind. ------------------------ 2009-05-15 07:49:42,574 INFO - SqlMapObjectDataDao - select - selectObject - 2 ms 2009-05-15 07:49:42,575 INFO - SqlMapUserDao - select - getUserSystemAdminSuperGroup - 0 ms 2009-05-15 07:49:42,576 INFO -... (3 Replies)
Discussion started by: jitendriya.dash
3 Replies

8. Shell Programming and Scripting

Awk Script for generating a report

Hi all, I have a log file of the below format. 20081016:000042 asdflasjdf asljfljs asdflasjf safjl 20081016:000229 /lask/ajlsdf/askdfjsa 20081016:000229 /lashflas /askdfaslj hsfhsahf 20081016:000304 lasflasj ashfashd 20081016:000304 lajfasdf ashfashdfhs I need to generate a... (3 Replies)
Discussion started by: manoj.naidu
3 Replies

9. Shell Programming and Scripting

how to align report headers in awk

Is it any way exept playing with spaces (tabs don't help) (3 Replies)
Discussion started by: galinaqt
3 Replies

10. Shell Programming and Scripting

help with awk to create report

Hi, I am trying to create a report using the following syntax: #!/bin/awk -f #script name: users_report BEGIN { FS=":" ; OFS="\t" ; print "User\tGID\tUser Name\tHome Dir\t" { print $1 , $3 , $5 , $6 } END { print "\n End of Report \n" } $> user_report /etc/passwd the output of... (5 Replies)
Discussion started by: ghazi
5 Replies
Login or Register to Ask a Question