From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8445 invoked by alias); 1 May 2015 21:51:22 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20176 Received: (qmail 20632 invoked from network); 1 May 2015 21:51:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_FSL_HELO_BARE_IP_2 autolearn=no version=3.3.2 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: zzapper Subject: Re: Parse apache error_log Date: Fri, 1 May 2015 21:50:45 +0000 (UTC) Organization: Your Company Message-ID: References: <20150501220311.6f101a62@ntlworld.com> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 95.146.95.168 User-Agent: Xnews/2009.05.01 X-Antivirus: avast! (VPS 150501-0, 01/05/2015), Outbound message X-Antivirus-Status: Clean Peter Stephenson wrote in news:20150501220311.6f101a62@ntlworld.com: > On Fri, 1 May 2015 15:41:37 +0000 (UTC) > > Well, you *could* do this... > > log=wherever > fgrep -h "$(tail -1 $log | sed 's/^\[\([^]]*\)\].*/\1/')" $log > > pws > Yep Does the job. -- zzapper https://twitter.com/dailyzshtip --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com