#!/bin/sh if [ ! $1 ] 2>/dev/null then echo "You have insert the name of the original file" echo "Usage: decommenta " exit 1 elif [ ! $2 ] 2>/dev/null then echo "You must insert a name for the backup copy" echo "Usage: decommenta " exit 1 fi echo "I'm cleaning $1" echo "Original file will be saved in $2" mv $1 $2 egrep -v ^# $2 > $1 echo "Cleaning complete!" exit 0