Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!uw-beaver!fluke!ssc-vax!bcsaic!paula From: paula@bcsaic.UUCP (Paul Allen) Newsgroups: comp.os.minix Subject: Re: cut.c Message-ID: <18787@bcsaic.UUCP> Date: 10 Jan 90 19:33:20 GMT References: <5067@ast.cs.vu.nl> Reply-To: paula@bcsaic.UUCP (Paul Allen) Organization: Boeing Computer Services AI Center, Seattle Lines: 33 In article <5067@ast.cs.vu.nl> ast@cs.vu.nl (Andy Tanenbaum) writes: > >I treid using cut yesterday to extract the third column from a crc listing >like this: > >65261 8510 alloc.c >09176 7432 break.c >53152 990 const.h > >I could not find any combination of -d and -i flags to convince it to consider >a run of spaces as a separator. I eventually did it with columns, but I >think it ought to work with fields as well. Does anyone (e.g., the author) >know how to do this? My experience with cut(1) on Suns and Ultrix is that a run of delimiter characters is always a series of empty fields. I suppose you could do something like: (while read line do echo $line done) Slow for big files, but it works. Does the System V cut(1) have an option to treat runs of delimiters as a single delimiter? Paul Allen -- ------------------------------------------------------------------------ Paul L. Allen | pallen@atc.boeing.com Boeing Advanced Technology Center | ...!uw-beaver!bcsaic!pallen