Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!elroy.jpl.nasa.gov!decwrl!mcnc!duke!jit From: jit@cellbio.duke.edu (Jit Keong Tan) Newsgroups: comp.unix.questions Subject: Re: file manipulation (easy question I think) Message-ID: <22400@duke.cs.duke.edu> Date: 18 Jun 91 01:26:17 GMT References: <1991Jun17.200748.19324@msuinfo.cl.msu.edu> Sender: news@duke.cs.duke.edu Organization: Duke University Medical Center, Dept. of Cell Biology Lines: 25 Nntp-Posting-Host: slic.cellbio.duke.edu In article <1991Jun17.200748.19324@msuinfo.cl.msu.edu> jpd@tardis.cl.msu.edu (Joe P. DeCello) writes: > >What is this best (easiest) way in which to get the first word >of each line in a text file to a single line in a new text file? > >^L >-- >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >Joseph P. DeCello III e-mail: jpd@cad.msu.edu >Michigan State University phone: (517) 353-3027 >Specialized Computing Support Services I ran this in an emacs/src dir: [63] jit@slic % ls -l t* | nawk '{ printf "%s %s === ", $5,$9}' - 770 temacs.opt === 33296 term.c === 14111 termcap.c === 2202 termchar.h === 1714 termhooks.h === 1717 terminfo.c === 1475 termopts.h === 177 testemacs.com === 6 966 tparam.c === [64] jit@slic % (outputs got wrapped by the screen) -- -------------------------------------------------------- Jit Keong Tan | internet: jit@slic.cellbio.duke.edu (919) 684-8098 | bitnet : tan00001@dukemc.bitnet