Subj : Re: Strip characters and lines from a text file To : Jonathan de Boyne Pollard From : Timo Salmi Date : Wed Feb 06 2002 03:29 am From: Timo.Salmi@f3.n342.z1.cereal.mv.com (Timo Salmi) Subject: Re: Strip characters and lines from a text file From: ts@UWasa.Fi (Timo Salmi) > MN> Is it possible to strip the first few characters from a > MN> line in a text file. In MS-DOS the following example will remove the first two charactes from every lie of your text file type myfile.txt|gawk '{printf"%%s\n",substr($0,3,255)}' 233923 Mar 25 1995 ftp://garbo.uwasa.fi/pc/unix/gawk2156.zip gawk2156.zip GNU awk text scanning and processing language as will type myfile.txt|cut 3 255 CUT.EXE Extract or delete text columns 108902 Aug 18 2000 ftp://garbo.uwasa.fi/pc/ts/tsfltc22.zip More filters: dump,col,concat,cut,detab,rep,rot13,undump,... (Potential followups for this message culled to news:alt.msdos.batch ) All the best, Timo -- Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5 Department of Accounting and Business Finance ; University of Vaasa mailto:ts@uwasa.fi ; FIN-65101, Finland Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html -- |Fidonet: Timo Salmi 1:342/3 | | Origin: The Cereal Port BBS (603)899-3335 199.125.78.133 (1:132/152) --- # Origin: (1:132/152.4) * Origin: Baddog BBS (1:218/903) .