Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Reads Log Files

DZone's Guide to

Reads Log Files

·
Free Resource
// Map directory structure and then read logs extract results.


!#/usr/bin/bash

for line in `ls /netapp/XXXXXX0/XXXXXX_logs`
	do 
	for line2 in `ls  /netapp/XXXXXX0/XXXXXX_logs/$line`
			do  echo /netapp/XXXXXX0/XXXXXX_logs/$line/$line2 
	done	
done | grep 2007-11-29 > results.dat

!#/usr/bin/bash
for res in `cat results.dat`
 do
 echo -n $res 
 echo -n " "
 grep -c ",i," $res/*
done
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}