Live Chat!

pcregrep, grep based on perl compatible regular expressions

          0 votos

November 20th, 2007 mysurface

grep supposedly support perl regex by specified -P option, but somehow my grep do not support that, it complains this when I trigger with -P
grep: The -P option is not supported
But when you check the manpage of grep, you will see this
-P, –perl-regexp
[...]

Posted in Regular Expression, Text Manipulation, pcregrep, printf | Hits: 22918 | No Comments »

Print color text in command line.

* * * *   1 votos

December 24th, 2006 mysurface

Sometimes echo is not enough, if you need to print more advanced format of text. Lucky, we have printf. printf is a common function call in c programming language, if you learn c before, you should very familiar with this function.
Simply illustrate the power of printf, do as follow:
printf ‘\n\t\thello\tworld\n’
Besides readable character, printf can accept [...]

Posted in Text Manipulation, clear, printf, read | Hits: 21664 | 5 Comments »