Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bit of a tricky one 1

Status
Not open for further replies.

nrich239

Programmer
Jun 9, 2004
22
US
Here's a tricky one.
We have a list of servers that we test every week for vulnurabilities.

When these servers report back, their report is stored in a directory "/reports/<date>/<serverName>"

Now what I wanna do is take the total number of servers, and subtract the ones that reported back. Problem is that each one that reported back has it's own file.

Any ideas?
I was going to do a comm but that requires a single file and not a directory
 
- /report/server/date is sure better
- what do you want ?
 
Clear out the dir each week

then issue

ls /reports/<date>/*|wc -l


Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant.
 
You may redirect the output of a ls command to a text file:
ls /reports/<date> > list.<date>
and then play with the comm utility.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top