Librenix
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Sed One-Liners Explained

Up
vote
Down

My previous post was about Awk One-Liners Explained and now I bring to you Sed One-Liners Explained!

Most people are only familiar with one particular command of sed, namely the "s" (substitute) comand. s/comand/command/. That is unsatisfactory. Sed has at least 20 different commands for you.

For example, any ideas what this sed one-liner does?

sed '/n/!G;s/(.)(.*n)/&21/;//D;s/.//'

Read the article to find it out!
 read more | score:9098 | -pkrumins, November 22, 2008
More Programming articles...

Buy Fine Art Prints Online

coding headlines

OpenShift Online: a non-developer guide

E-book: Perl One-Liners Explained

bash scripting: Looping through a list

Bash: Use the Test Command for multiple aspects

Perl One-Liners Explained: Handy Regular Expressions

Add Video Streaming to C/C++ apps with Nex Gen Media Server API

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

 
Articles are owned by their authors.   © 2000-2012 Ray Yeargin