Perl - Shell Scripts
The usefulness of perl is not very much exploited by windows users. I wish I could change that by my scripts. For these scripts to work, get ActivePerl if you are a Windows user. If you use perl, just run these scripts at the console with the command 'perl <filename>'. All the given scripts are free for you to copy, distribute, modify or any other thing that comes to your mind.
These scripts that I have provided here are made by me and used with the Active Perl compiler. I made the first two to aid me in organizing many html files. They may not be much help for you as it is, but you can use them after modifications.
| SeekAndExtract Vs 1.00.B |
| For extracting content from HTML files from a user specified string to another user specifed string and save them as a txt file. Useful if you have a lot of html files you need to convert to text files. |
|
| LineRename V 1.00.A |
|
Renames all the text files in a folder to their respective first lines. If there are blank lines, it clears the file of all blank lines. I don't see how you can use this program to fit your perpose, but I made it when I had a lot of small poems in text files. I used this program to give the poem's files names.
|
|
| HTMLViewer V 1.02.A |
|
This is a offline HTML file viewer for DOS. Run the script with the html file in the command line. For best results, use the Batch file 'html.bat
|
| |
I have made more Shell Scripts, but I don't know whether the visitors of this web can use it. As a result, I have not uploaded it. All my scripts are listed here - just the name and a small description, no script. If any one is intrested in any script, please let me know and I will upload the specified program.
| record analyser | 1.00.A |
|
This script analyses the 'Record.txt' file made by the Boot Boster program and show the results in a graphical format. This script will give you a graphical break down of all your boots. It compare the hits in Morning and Evening, in the different hours of the day, and in all the months. It will display the results in a very detailed and attractive graphical form.
|
|
| DigitAchiveSearcher | 2.00.C |
|
A perl script to search the Digit magazines data base of previous issues.
|
|
| Rediff Virus Remover | 1.00.A |
|
This was created to to remove the RediffBol virus from HTML Files.
|
| |
Formatering
| 1st Impression Formater | 1.00.A |
|
This script will convert BootRecorder format of one line jokes to
1st Impression Format. Will space words according to the screen space.
|
|
| ReNamer | 1.00.A |
|
For extracting one specific line from HTML files from '$search_string' to '$end_string'
and give the file that line as its name.
|
|
| ExtractnNamer | 1.00.A |
|
This will expract a specified line(specified as a regular expression) and then give it as
the name of the file.
|
|
| LineExtracter | 1.00.A |
|
Copies all lines in the file "$file" with the text "$search" in them to a
new user specifed file and all the lines without that text to another file
|
|
HTML Helpers
| Linked File Mover | 1.00.A |
|
This will move all the files linked in a html file to a new user defined folder.
|
|
| HttpToFile | 1.04.A |
|
This will correct the links of all the html files within a folder.
The html files must be taken from the internet thru IE's save function.
This will also corrects the image links, script links and style sheet links.
|
|
MP3 CD Indexer
| M3U Collector | 1.01.A |
|
Input a winamp playlist of a MP3 CD and this script will analyze it and save the
results to a Database that can be searched with the Searcher script.
|
|
| M3U Searcher | 1.00.A |
|
Searchs a Database that is created by the M3U collector for a user specified song or artist.
|
|
Some
CGI Scripts are also available...
Comments
Looks like u might be able to help me.
I have .pag files that i need to be converted to .txt files.
This has to happen for all the files under all folders and subfolders.
For Eg: Lets consider a folder structure in a unix box : data/year/org1/org2/org3 ....
The script must be able to create the same folder structure in another location and convert all the .pag files to .txt retaining their respective folders.
i.e, if a file "test.pag" in the folder /data/year/ in the unix box , i have to convert tthe test.pag to test.txt and put it in the other location /data/year/.
I hope i make sense.
If you can .. pls do help .. its urgent.
Thanks,
Juno
find . -name "*.pag" -exec rename .pag .txt {} ;
I am assuming you have a unix box - if its a windows machine, this will be much harder.
I have similar reqmt like your LineExtracter script. I need to filter the lines based on the search to a new file. That will be much help if you can upload this script.
Thanks,
Amit
regards,
senthil,
Thats all.
I have a perl script that I need to run either as a bat file or an exe, we are a windows shop and I am trying to get an old report I had that ran on Linix to work here at my new shop that has windows. Is there an easy way to convert the perl script to a bat file or exe?
I have an output file like this:
080480-8108000 r-xp 0000 /delsoft/PbdProfiler/SPYGLASS_HOME/obj/check.Linux2
b06fa0-b07040 r-xp 00000 /delsoft/tcl_perl_interface/arch/auto/Tcl/Tcl.so
b06fa0-b07040 r-xp 00000 /delsoft/tcl_perl/arch/auto/Tcl/Tcl.so
and so on....
I need to print only the first column and the last column using Hashes of Arrays.........
So i need help in this regard.
Thanks and Regards,
Shivangi
Please do the needful
Venki
I need a Perl script to apply a regular expression on a text file and return the match. I use the applescript command do shell script" perl -e . I am new to perl, co these example could be usefull...
Thanks in advance...
Rda
$reportname=$ARGV[0];
$count=$ARGV[1];
#print "$reportname$count";
$FILE_NAME="$ENV{AI_SERIAL_LOOKUP}/fwore_file_time.dat";
#print "$FILE_NAME";
open(DAT, $FILE_NAME)|| die("Could not open file!");
@raw_data=<DAT>;
close(DAT);
foreach $record (@raw_data)
{
@test_array=split /,/, $record;
$array_size=@test_array;
$test_string="";
if (lc($reportname) eq lc($test_array[0]))
{
if($count == $test_array[1])
{print"0";}
else
{
$i=2;
while($i <= $array_size)
{
$test_roc_string="$test_roc_string, $test_array[$i]";
$i=$i+1;
}
$test_roc_string = substr($test_roc_string, 2, length($test_roc_string)-6);
if (lc($reportname) eq 'apecs')
{
print"For APCES source, we are expecting 2 files.";
}
else
{
print"For report $reportname, we are expecting files from the following ROCs: $test_roc_string";
}
}
}
}
a, strong, em, b, i, code, pre, pandbrallowed. Other tags will be shown as code(< will become <). Urls, Line breaks will be auto-formated.