You're viewing a comment by Peteris Krumins and its responses.

June 24, 2011, 15:37

Thanks for the comment and I am glad that you liked my book! I never thought about including a file to test one-liners on, and it's a great suggestion. I'll make sure to include the files in my next revision of this book and my future books.

Until then, I can share the files that I used to test one-liners on.

The first one contains just 10 lines. I call this file n. I use it to test line spacing, matching lines, numbering lines, text conversion and other tasks.

l 1
l 2
l 3
l 4
l 5
l 6
l 7
l 8
l 9
l 10

Then I have the n2 file that is double-spaced version of n. I use it to test one liners such as 'number only non-blank lines in files' and 'delete all blank lines from a file'.

l 1

l 2

l 3

l 4

l 5

l 6

l 7

l 8

l 9

l 10

Then I have this crazy file called crazy that I used to test most everything else:

line one hello wold
line      two       foor    bar baz
line three esr rms lbt
line four french english spanish
another line

line five c cpp perl
line six energy power work

kakakdfjfgjfhhgfieiuowerwoieroiuqwe

line seven integral matrix set

repeated line
repeated line
repeated line muahaha
repeated line

line eight pen stool lamp
line nine you me him


line ten coffee tee pop last

That's about it. :)

Comment Responses

mcai8sh4 Permalink
June 24, 2011, 19:24

Haha, thanks! You've made learning AWK an easy, but profitable job. Take care.

September 12, 2013, 19:22

Jerky Naturals Treats – 6 oz – Tender Turkey (ZU22558) – By:

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.