gnuServices - tools and scripts you can use!
"If you want to suggest a script/tool to be posted here, please let us know. We shall do this for free. We shall post it gladly for you with your name and a small photograph. Let the free software movement grow."
List of Perl Scripts- Scripts for fun
- Smart HTML
- File Timmer
- Tasklist
- Area of Polygon
- Get keywords from web page
- Find and Replace script
- Locate Perl modules on your system
Smart HTML
Click here to view scriptSmart_html perl script takes filename as argument. Re-writes all tags and attributes in lower-case and adds double quotes to attribute values if missing. Old files are backed up in the same directory by appending .old to the original filename.
File Trimmer
Click here to view scriptThis Perl script is useful for reducing size of your log files. With this script you can reduce first 'n' number of lines from a file.
Tasklist
Click here to view script
Script for task management. You can list your tasks using this perl script. You can add and remove your tasks from your list. With '-a' you can add tasks to your tasklist and with '-r' you can remove tasks from list. To remove tasks from your list you have to give task numbers.
Usage :
- tasklist to list tasks
- tasklist -a to add a new task
- tasklist -r task-numbers to remove tasks from list
Get area of Polygon enclosed in given points
Click here to view scriptThis perl script calculates area of a polygon enclosed in given points. You have to enter X and Y co-ordinates of every point of the polygon.
Here is the formula for calculating area of a polygon having 'n' points.
area of polygon =(1/2)*(x1y2-x2y1+x2y3-x3y2+ .... +xny1-x1yn)
Get keywords from web-page
Click here to download this gzip file.
sh getKeywords.sh http://www.artists-india.comWith this command you can see unique words and the number of times they appear in that page. You can change the URL to see keywords of that page.
common_words file contains those words which may not be considered as keywords. You can add some more to this list. There's no need to add 1 or 2 lettered words. All such words are excluded from the statistics.
This set of files is a good tool for deciding on keywords for a web-page/text-file.
Updated Find and Replace script to ignore symbolic links !
Click here to view scriptThis perl script does 'find and replace' recursively in sub directories. This script is free to use and modify. Please suggest your modifications, changes or errors by filling out our contact form.
Locate perl modules on your system
Click here to view scriptThis perl script uses built in @INC array to print locations of the perl modules installed on your system.
Headlines from Rediff Page
This shell script gives you the day's headlines. Write the following command in a file called headlines. Make it executable by issuing the command
chmod +x headlines
Copy this file into a directory which is included in PATH. You can see the path using echo $PATH.
lynx -dump -nolist http://in.rediff.com/headline.html | grep "^ *o "
Usage: ./headlines
Use these Linux command tips and learn Linux.
