Home > Archive > Linux/Unix > December 2003 > Terminal QOD for 12-8-03





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Terminal QOD for 12-8-03
Papiya

2003-12-08, 8:16 am

Interpret the following script:

#!/usr/local/bin/perl -w
$/ = ".\n";
while (<> ) {
next if !s/\b([a-z]+)((\s|<[^>]+> )+)(\1\b)/\e[7m$1\e[m$2\e[7m$4\em/ig;
s/^([^\e]*\n)+//mg;;
s/^/$ARGV: /mg;
print;
}

It's mostly regexp syntax, so should be a breeze for you Linux freaks!
ClintonN

2003-12-08, 2:22 pm

Ummm....
Papiya

2003-12-08, 4:44 pm

quote:
Originally posted by ClintonN
Ummm....


Close, but no cigar.
ChrisDfer

2003-12-08, 5:05 pm

If you stare at it long enough it looks 3d.
Papiya

2003-12-08, 5:13 pm

quote:
Originally posted by ChrisDfer
If you stare at it long enough it looks 3d.


It checks some files for duplicate words without regards to then displays each duplicated line along with the file that it is located in.

Quite handy, acutally.
ClintonN

2003-12-09, 2:51 am

Why do you have to be as intelligent as you are beautiful? It makes me feel ashamed about most of my ex's.
Papiya

2003-12-09, 7:11 am

quote:
Originally posted by ClintonN
Why do you have to be as intelligent as you are beautiful? It makes me feel ashamed about most of my ex's.


Just my nature I guess. Thanks for the compliments.
ClintonN

2003-12-09, 8:33 am

You are welcome!
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net