Sunday, February 22, 2009

Unix/Linux find command tutorial

The Best tutorial and reference for Unix/Linux find command. Please follow the link :
http://content.hccfl.edu/pollock/Unix/FindCmd.htm

Friday, February 6, 2009

Read form data using Perl

#!/usr/bin/perluse strict;
my $formdata;

read(STDIN,$formdata,$ENV{CONTENT_LENGTH});
print "Content-type: text/html\n\n";

#Add html codes..
for( split(/&/,$formdata) )
{
$_ =~ tr/+/ /;
my ($n,$v) = split(/=/,$_,2);
$n =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
$v =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
print "$n=$v\n";}
print 'add closing html codes';

Tuesday, November 18, 2008

Linux Basic Commands

how do I get the line, word, or character count of a fine in UNIX?
wc
Replace with the file or files for which you want information. For each file, wc will output three numbers. The first is the line count, the second is the word count, and the third is the character count. For example, if you entered wc .bashrc, the output would be something similar to the following:
13 23 709 .bashrc
The options are:
wc -l - by lines
wc -w - by words
wc -c - by bytes