Welcome to Linux Family

Linux is a powerful opensource OS. Once you are in it, you feel like a genious! Now what are you waiting for? Install Linux in your machine and make the world out of it!

Apache Webserver Installation guide

Have a Linux server or localmachine? Need to power your own websites in it? Here you go!! Click to unleash apache webserver installation guide and learn to host your own sites

Linux Processes Overview

This document will give you an overview of linux processes. Advanced topics yet to come!!

Stop spamming!Sign outgoing mails

DKIM is an excellent software to digitally sign your outgoing mails and thus ensuring proper inbox delivery of all your mails.

Thursday, June 10, 2010

shell script to take backup of a file line by line

#!/bin/bash
l=`cat testing|wc -l`
for i in `seq 1 $l| sort -n -r`
do
sed -n "$i p" testing >> back
sed -i "$i d" testing
echo "deleted the line $i"
done

Wednesday, June 9, 2010

Shell script to Read a line until a keyword is entered

#!/bin/bash
echo "Enter Your sentence. Type exit and press enter to terminate. (Output stored in file named 'samp')";
while [ $!1 ]
do
read a;
echo $a >> testfile
echo `cat testfile` |grep exit > testing
if [ -s testing ]
then
echo "Program exit"
sed -i 's/exit//' testfile
cat testfile > samp
rm testfile
rm testing
exit
fi
done