From af137@torfree.net Mon Aug 17 02:02:22 1998 Newsgroups: alt.comp.editors.batch,comp.unix.shell,comp.editors,comp.langs.awk Path: fu-berlin.de!news3.bellglobal.com!news1.bellglobal.com!torfree!af137 From: af137@torfree.net (Al Aab) Subject: sed question Message-ID: Organization: Toronto Free-Net X-Newsreader: TIN [version 1.2 PL2] Date: Sun, 16 Aug 1998 05:40:10 GMT Lines: 179 Xref: fu-berlin.de alt.comp.editors.batch:3055 comp.unix.shell:66088 comp.editors:32856 [ Article crossposted from comp.unix.questions ] [ Author was Al Aab ] [ Posted on Sat, 15 Aug 1998 09:35:44 GMT ] sed "p;s/^\(.\{72\}\).\{8\}/\1 /" ----------------------------------------- eders is 2 glorious yrs old this aug 1998 to master regular expressions to master sed join my seders informal email list af137@torfree.net ----------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SED RESOURCES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ to master regular expressions to master sed join my seders informal email list : af137@torfree.net ---- sed web pages "sed one liners" by Eric Pement "Doing It with sed" by sed stud Carlos http://seders.icheme.org/ seders grab bag (seders official web page) http://www.dbnet.ece.ntua.gr/~george/#seders seder, engineer, Dr2b Yiorgos THE SED FAQ latest version of the sed FAQ is usually at: http://seders.icheme.org/tutorials/sed_faq.txt http://www.dbnet.ece.ntua.gr/~george/sed/sedfaq.html http://www.ptug.org/sed/sedfaq.html http://www.cornerstonemag.com/sed/sedfaq.html ---- http://www.math.fu-berlin.de/~guckes/sed/ seder Herr Guckes http://www.math.fu-berlin.de/~leitner/sed/ Herr Leitner http://www.ptug.org/sed/custom_sed.html supersed writer, seder Simon Taylor http://www.cis.nctu.edu.tw/~gis84806/sed exotic scripts.seder Yao-Jen Chang sed/regular expressions tutorials/refs 1- http://www.dordt.edu:457/OSUserG/BOOKCHAPTER-14.html Chapter 14, Manipulating text with sed 2- "Doing It with sed" by sed stud Carlos (see http's above) 3- SunOS Manual Pages http://www.intac.com/man/sunos/sed.1v.html http://cmgm.stanford.edu/man2html/sed.1v.html 4- u-sedit2. has nice sed docs. http://wuarchive.wustl.edu/systems/ibmpc/garbo.uwasa.fi/editor/u-sedit2.zip 5- dc UNIX stack-calculator, in sed, by sed stud GREG UBBEN http://www.dbnet.ece.ntua.gr/~george/sed/dc.sed.html 6- sierpinski gasket/triangle, in sed, by sed stud KEN PIZZINI posted by Al Aab, in July 1998 to alt.comp.editors.batch & comp.unix.shell search dejanews ---- some sed implementaions "official" release of GNU sed-3.01 is finally available from: ftp://ftp.gnu.org/pub/gnu/sed-3.01.tar.gz sedmod.zip very extended/awkish DOS sed ftp://ftp.adam.anet.cz/pub/cdrom3/fileutil/sedmod.zip http://www.ptug.org/sed/SEDMOD10.ZIP MKS Toolkit, windows 32 http://www.mks.com ftp://uiarchive.uiuc.edu/pub/systems/pc/simtelnet/win95/util/ ud32_v43.zip B 3381699 980512 UnixDos: Full Unix set: 65 progs +28 new utils ftp://uiarchive.uiuc.edu/pub/systems/pc/simtelnet/win3/util/ ud16_v42.zip B 4767550 980313 UnixDos: Full Unix set. 64 progs +28 new utils ---- my favourite DOS/UNIX sed : ftp://uiarchive.uiuc.edu/pub/systems/pc/simtelnet/msdos/txtutl/sed15.zip ftp://uiarchive.uiuc.edu/pub/systems/pc/simtelnet/msdos/txtutl/sed15x.zip Directory: /pub/systems/pc/simtelnet/msdos/txtutl/ Filename Type Length Date Description sed15.zip B 62082 910930 Unix-compatible streaming editor v1.5 TC src sed15x.zip B 20300 910930 Unix-compatible streaming editor v1.5 EXE/docs sed15.zip has C source, compilable for UNIX. sed15.exe compiled with mingw32 for 32bit environments at: http://www.dbnet.ece.ntua.gr/~george/sed/sed15.exe ---- sed/batch/text newsgroup: alt.comp.editors.batch if your newsfeed does not carry it, search dejanews. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Charles Demas (demas@sunspot.tiac.net) wrote: : In article <6quv6l$u7s$1@nnrp1.dejanews.com>, : wrote: : >Hi, : > : >I'd like to edit a file to change contents from column 73 to 80 to spaces. Is : >this possible done by sed? BTW, I try not use ^....(72 dots). : Well, how about: : sed 's/......../ /10' infile : which doesn't change anything for a 79 column line, or any lines without : 80 columns, but this would: : sed 's/./ /73;s/./ /74;s/./ /75;s/./ /76;s/./ /77;s/./ /78;s/./ /79;s/./ /80' : this is just : sed 's/./ /73' infile : repeated for the other columns one wished changed. : So, this only took me 8 dots in either approach. :-) : Chuck Demas : Needham, Mass. : -- : Eat Healthy | _ _ | Nothing would be done at all, : Stay Fit | @ @ | If a man waited to do it so well, : Die Anyway | v | That no one could find fault with it. : demas@tiac.net | \___/ | http://www.tiac.net/users/demas -- =-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- al aab, seders moderator sed u soon it is not zat we do not see the s o l u t i o n -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ -- =-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- al aab, seders moderator sed u soon it is not zat we do not see the s o l u t i o n -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+