Using sed for grouping

October 29, 2010 at 11:42 pm Leave a comment

Fun game: using sed to group lines

sed -ne '/^BEGIN/, /^END/ H; /^END/ {x; s/\n/£/g; p;}'

You can then use grep to extract those groups that you are interested in and return them to normal formatting use

tr £ \n
Advertisements

Entry filed under: Uncategorized. Tags: , , , .

Getting Steam to run on ubuntu with play on linux Command line script to upload images to imagebint

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


October 2010
M T W T F S S
« Sep   Nov »
 123
45678910
11121314151617
18192021222324
25262728293031

%d bloggers like this: