Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!harvard!seismo!elsie!cecil!john From: john@cecil.UUCP (john knight) Newsgroups: net.text Subject: Re: "vi" questions Message-ID: <69@cecil.UUCP> Date: Fri, 20-Jun-86 14:06:01 EDT Article-I.D.: cecil.69 Posted: Fri Jun 20 14:06:01 1986 Date-Received: Sun, 22-Jun-86 12:32:37 EDT References: <1273@brl-smoke.ARPA>, <19016@rochester.ARPA> Organization: NIH-CSL, Bethesda, MD Lines: 13 Keywords: vi lines search > ~ How to select lines of length 40 while in vi? Use vi to filter your file thru awk. You can write an awk script which marks the lines you want to treat. Here is an example: 1G #start at line 1 !Gawk ' {if (length > 40) {print "mark"$0} else print}' #filter file thru awk g/mark/cmds #do your thing The unique power of UNIX (UPOU) is that vi includes awk. All tools are designed to be included in all other tools. john "What a difference a [Gg] makes!"