Last line of file/Perl

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Voltage Spike
日付:  
題目: Last line of file/Perl
On Thursday, November 14, 2002, at 01:49 PM, Mike Starke wrote:

> On Thu, Nov 14, 2002 at 12:41:50PM -0800, Matt Alexander wrote:
> /_tail -1 somefile ?
> /_
>
> I was actually looking for a Perl solution without having to read
> through the entire file.


I suppose:

$results = `tail -n1 $somefile`;

isn't good enough?

- -- 
                                                            Voltage Spike
       ,,,
      (. .)
- --ooO-(_)-Ooo--