From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Colin S. Miller" Newsgroups: gmane.emacs.help Subject: Re: Easy for Some Date: Tue, 05 Jan 2010 21:54:55 +0000 Organization: SunSITE.dk - Supporting Open source Message-ID: <4b43b4ea$0$277$14726298@news.sunsite.dk> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1262800610 27227 80.91.229.12 (6 Jan 2010 17:56:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Jan 2010 17:56:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 06 18:56:43 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NSa7Z-0007fx-Tt for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Jan 2010 18:56:40 +0100 Original-Received: from localhost ([127.0.0.1]:56821 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSa7N-00073Y-Nj for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Jan 2010 12:56:25 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!cgl.ucsf.edu!newsfeed.berkeley.edu!ucberkeley!newsfeed1.swip.net!News-Peer-Europe!news-peer-europe.sprintlink.net!news.net.uni-c.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 35 Original-NNTP-Posting-Host: 62.56.68.180 Original-X-Trace: news.sunsite.dk DXC=?U9:FkFc; f]@?0gJFJ]ae[YSB=nbEKnk[STbna90FD[R5fdD?L8VmBXOOn[7LY1L_UQScK68eBi5W; QNS\SSPXnW=`B>8HMEIDXBfV1F?f:QZ_fJ5_G5_D5[P Original-X-Complaints-To: staff@sunsite.dk Original-Xref: news.stanford.edu gnu.emacs.help:175992 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71079 Archived-At: marioepsley wrote: > I'm not coder but i needed to extract some information from a text file and > some one pointed me in this direction. > > I have a file like this, could have up to a 1000 keyframes.: > > > > Effects Sound Keys #1 Output 1 #22 > Frame > 0 0.17489 > 1 0.261281 > 2 0.361762 > 3 0.400085 > 4 0.411538 > 5 0.434799 > 6 0.41712 > 7 0.422151 > 8 0.43181 > 9 0.411811 > Mario, Or, skipping emacs all together, use AWK awk -F \\t '{print $2}' < input.txt | tr -d ' ' > output.txt This AWK command sets the field delimiter to TAB (aka \\t), and prints the second field from each line in the file. The tr command deletes all spaces from its input. If you use MS-Windows, only use one \ HTH, Colin S. Miller