date in awk
hello i am facing problem in the following shell script.please help me.
file is as below #Rwatch.sh clear tail -F /var/log/squid/access.log | awk '{print $3 "\t" date $7}' >> output.txt |
so what problem are you having?
|
Quote:
-Rajendra |
sample input text would be handy... can't test something without input, and i don't think too many people will have squid logs of their own...
|
Code:
tail -F /var/log/squid/access.log | awk '{print $3 "\t" "date " $7}' >> output.txt If you want 'the date' then try: Code:
tail -F /var/log/squid/access.log | awk '{print $3 "\t" strftime() " " $7}' >> output.txt |
Quote:
-Rajendra |
All times are GMT -5. The time now is 07:09 AM. |