Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] sed and awk
- To: tlug@example.com
- Subject: Re: [tlug] sed and awk
- From: Shimpei Yamashita <shimpei@example.com>
- Date: Thu, 11 Apr 2002 22:11:17 +0900
- Content-disposition: inline
- Content-type: text/plain; charset=us-ascii
- In-reply-to: <20020411044934.GA27881@example.com>
- Organization: Hummingbird Heaven
- References: <20020411044934.GA27881@example.com>
- Sender: Shimpei Yamashita <shimpei@example.com>
- User-agent: Mutt/1.3.28i
On Wed, Apr 10, 2002 at 09:49:34PM -0700, Michael Moyle wrote: > > Just for fun: > > Does anyone have any examples of their favorite uses for sed and/or awk? I use awk a lot for this type of one-liner: awk '{print $1}' tabular_file I've never found sed to be useful for anything I couldn't do efficiently with perl, however. But then again, it's been years since I've been forced to work on perl-free Unix machines. > I have not worked much with either tool, and want to see how they > interplay, and what each is best at. > > Or if you feel perl has superceded them, post a perl example. ^ <spelling nazi>superSeded!</spelling nazi> > Right now I am using sed to go through and replace all the package names > in a bunch of of java files. And I started thinking about awk. perl -pi.bak -e 's/old_package_name/new_package_name/g' \ `find . -name "*.java" -print` -- Shimpei Yamashita http://www.shimpei.org/ perl -w -e '$_="not a perl hacker\n";$q=qq;(.);x9;$qq=qq;345123h896789,;;$s= pack(qq;H6;,q;6a7573;);$qq=qq;s,^$q,$s$qq;;$qq=~s;(\d);\$$1;g;eval$qq;print;'
- References:
- [tlug] sed and awk
- From: Michael Moyle
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Honeypots
- Next by Date: [tlug] OpenBSD local exploit
- Previous by thread: [tlug] sed and awk
- Next by thread: Re: [tlug] Honeypots
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links