[lug] Bash-ing an FTP log summary
Bill Thoen
bthoen at gisnet.com
Wed Jun 28 06:31:06 MDT 2006
Thanks... I'll try that. Both methods are new to me, but I should be able
to figure out the syntax once I know what to look for!
- Bill Thoen
On Tue, Jun 27, 2006 at 08:24:56PM -0600, Tony Dyson wrote:
> First thought is that "cut" & a "for i in `cat <tmp-file>`; do
> [etcetera]" might help you to get the numerical component into a
> variable for further manipulation.
>
> Bill Thoen wrote:
> >Hi folks,
> >
> >I'm trying to write a bash script to summarize total daily FTP transfers
> >(in terms of data transfered in and out) from my vsftp logs. So far, I've
> >got a file
> >that produces output like this each day:
> >
> >o 123456
> >o 32456
> >i 1235
> >o 123456
> >... etc.
> >
> >The 'o' is out and 'i' is in. The number is the amount transfered. What I
> >want to do is summarize the transfers each day and add them to a running
> >total in a file. Can I do this in a bash script? How?
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
>
More information about the LUG
mailing list