rokoder

Tag: script

Get N matches using grep

by on Feb.11, 2012, under Programming

Here is the test data that we gonna use:

>grep create *.log
1.log:create1
1.log:create2
10.log:create1
10.log:create2
2.log:create1
2.log:create2
3.log:create1
3.log:create2
4.log:create1
4.log:create2
5.log:create1
5.log:create2
6.log:create1
6.log:create2
7.log:create1
7.log:create2
8.log:create1
8.log:create2
9.log:create1
9.log:create2
>

Finding the First N matches
(continue reading…)

Leave a Comment :, , more...

Faster way to extract file name

by on Dec.29, 2011, under Programming

Working with unix shell and no way you wont end up extracting file names from paths. Well there is a usual way to do it.

>basename /my/big/long/path/to/a/little/bitty/file
file

Here is another way:

(continue reading…)

1 Comment :, , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...

Archives

All entries, chronologically...