Getting the file name



The script below produces a result, but I dont know what file applies
to what result.
Thought the file name would be $i, but printing that gives me the grep
result line in total

How can I print the file name?

TIA

Owen


------------------------------------------------------------------------------------
#!/bin/bash
USER=$1
for i in /var/www/*.csv

do
cat $i|grep $USER|awk -F "," '{sum+=$4}END {print " Usage = "sum/60}'
done
------------------------------------------------------------------------------------

.



Relevant Pages

  • How to check Websphere Application Server status UP/DOWN in AIX
    ... I want to write a script which would just grep all the processes that ... Now i Dont know what all processes needs to be monitored to ensure the ... WAS server is running. ... script will b more then useful.. ...
    (comp.unix.aix)
  • Re: [PHP] Passing vars w/refresh w/register globals off?
    ... Dont know why you want to, ... This wasy all you need is pass the ID within the browser. ... > switch for routing to desired pages according to form input data. ... I'm thinking the old script would be php3 and the new ...
    (php.general)
  • Re: Looking for maybe impossible script?
    ... The admin rights on the laptops were ... Even if i could get a script that would notify me of such ... I just dont have the time. ... aide fix and tracing them down to the port an then shuting it off. ...
    (microsoft.public.windows.server.scripting)
  • Re: Running Login Script after establishing a VPN connection
    ... I dont know what you mean by a "pure batch command". ... "Pegasus (MVP)" wrote: ... This would be equivalent to your current VB Script program ... The network drive disconnects before the bat file ...
    (microsoft.public.windows.server.scripting)
  • RE: Disable Access to a printer
    ... Setting the WaitOnReturn to true causes the script execution to wait until ... The check printing pogram is started from a batch file if i could have ... The other possibility i thought of is to use runas and set the printer ... HPPrinter and CheckPrinter. ...
    (microsoft.public.scripting.vbscript)