Entries from September 2011

Shell trick #1: Numbering lines in text files

Posted by | Comments (0) | Trackbacks (0)

Hi, today I'll present you something new. It is an experiment and I'd be curios whether you like it. I've started a little series of ttyrecs. That means, I've recorded a little tip or trick on the console and uploaded it to PLAYterm so it can be easily played back in the browser. I thought it could be useful to do a little command line gymnastics.

Today I'll show you three ways how you can number lines in text files. We'll do that with cat, nl and vim.

Note: you need JavaScript enabled in order to play the ttyrec.

Read more…

Grep's out of date? Full ACK!

Posted by | Comments (2) | Trackbacks (0)

grep is a handy tool and I use it every day. But sometimes I wish it had some more features. For instance full featured Perl compatible regular expressions (PCRE) since the current implementation is not complete and I think it will never be, automatic recursive search, exclusion of non-text files etc.

Here a tool called ack comes into play. It's a search tool and grep replacement written in Perl, which is able to do all these things. Guess what!

Read more…

(Page 1 of 1, totaling 2 entries)
Design and Code Copyright © 2010-2024 Janek Bevendorff Content on this site is published under the terms of the GNU Free Documentation License (GFDL). You may redistribute content only in compliance with these terms.