August 01, 1999 03:01 PM

SED

Rating: (0)
Windows IT Pro
InstantDoc ID #5697
An indispensable batch-file utility
During the past 18 months of automating Windows NT Server installations, I discovered an indispensable batch-file utility that UNIX users have always known about—SED. This utility lets me do things that aren't possible or would be more difficult using standard batch-file commands. For example, SED simplifies taking input from a user at a command prompt, retrieving values from text files and assigning them to environment variable...

ARTICLE TOOLS

You must be a paid Professional Member to access this entire article.

Already a Professional Member? Please log in now:

NOT A PROFESSIONAL MEMBER? YOU CHOOSE:

Monthly or Annual

Professional Membership

VIP Membership

Compare Member Benefits

Add a Comment

How do I insert a new line in a search and replace statement?

Anonymous User 11/30/2004 12:30:48 PM


Better get the version from
http://unxutils.sourceforge.net.

The ones here do not substitute \\1, \\2, \\n, \\t, etc properly. like so:
s/example/for example:\\n\\t/
s/^default=.*partition(\\([0-9]*\\)).*$/SET PARTNUM=\\1/

Then you can reduce a lot of code.

LH 6/15/2004 10:43:39 PM


i am a little new to some of this but exactly what is meant by "machine path directory".also can this be used with a
WIN98 system?any particulars would be appreciated.thanx

james santinello 9/16/2003 8:16:15 AM


SED is an ancient *nix utility. Open source.
Maybe ya should do some of your own research before posting?

what I WOULD like to know is where the binary is. While I'm sure I can find it myself, a linke to where you got the binary from would be very helpfull.

simon6/5/2003 2:02:24 PM


Need to know the source of the code (who wrote it) and redistributions rights before this utility is useful ...

Jeffrey Cooke 4/11/2003 8:57:21 AM


what are the licensing terms of the sed software in the article?

william milbratz 2/14/2003 5:05:33 PM


A convoluted half fix to another convoluted and hobbled brain dead windows function. Why isn't there a simple "read" command as in unix. Does everything under the gui have to be half-a****?

DANIEL1/18/2002 4:44:29 PM


I am trying to write a Bacth file that delete old user profile directories from c:\\winnt\\profiles except for the system ones ie Default etc. How do i do this Can anyone help..

Indika Ratnayake 1/3/2002 12:48:29 AM


I use an *extremely* handy utility called TextPipe that does far more than just sed style search/replace, and from the command line. You can grab it at

www.crystalsoftware.com.au

I have found the author to be very responsive to support calls as well.

Simon Carter 6/25/2000 9:59:24 PM


I believe SED to be an absolutely critical tool in any network admin environment. We just would not be able to give users the service we do without SED running along inside all our bat files setting things up.

Anyway the article sure demystifies a lot of the syntax, but also adds to it. For eg we only have ever used the s function (substitute) and i was surprised to see all the others like c (change. The article would have been complete with examples of all the other functions.

Anyway good stuff.

Mark De Bortoli 1/16/2000 6:06:03 PM


You must log on before posting a comment.

Are you a new visitor? Register Here

windows server 2008 login scripts

I have 2 win2k8 servers one pdc and bdc. The domain is exampledom.com They are connected to 2 iscsi luns which replicate each other. We are running ac...222-96118

advertisement

GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS

White Papers

Your remote offices contain valuable electronic data – are they adequately protected? Learn how proven technologies can reliably and cost-effectively back up a branch office from a central location, in real time, to disk or tape, and even utilize existing backup solutions.

Downloads

PacketTrap IT is a comprehensive and affordable network management and application monitoring solution that solves problems associated with bandwidth, network and application performance, and connectivity. Gain insight into your network - try PacketTrapIT free for 21 days!

Web Seminars

IT administrators have to solve a myriad of problems. This web seminar outlines the ten most common systems management pains - including managing highly distributed systems and dealing with data theft/loss – and the best practices to address each.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.