Sponsored Content
Top Forums Shell Programming and Scripting Umbrella Scripting(very Urgent) Post 302181129 by sunitachoudhury on Wednesday 2nd of April 2008 07:13:48 AM
Old 04-02-2008
Umbrella Scripting(very Urgent)

Hi All,

Can anybody help me to write the umbrella script for the following?

I have three steps to do.

STEP 1: CONVERT XML files to PS files

STEP 2: CONVERT ALL PS FILES TO PDF FILES

STEP 3: FTPING ALL PDF FILES TO THE SERVER.

I have the codes for the above three steps.

Now I want to write such an Umbrella script to integrating the above 3 steps. So that it will execute after STEP 1, STEP 2 and after STEP 2, STEP3.
And if connection will be broken in STEP 2 then it won't go to next STEP 3.
When next time I will start running the script then it should start the doing the jobs from where it is broken??? For example if it is broken in STEP 3 then it will start doing the job from STEP 3.


CAN ANYBODY HELP ME TO WRITE THE UMBRELLA SCRIPT LIKE THE ABOVE REQUIRED SPECIFICATION??????????

IT IS VERY URGENT. If anybody helps me then really I am grateful to that guy.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help needed in shell scripting......urgent

Dear friends, please help me to solve following problem. I'm running a frontend application from which i'll be invoking the shell script with arguments as given below -driver -w -p "ABC XYZ" -S -ds con -dn "abc xyz" i am getting $1=-driver $2=-w $3=-p $4="ABC $5=XYZ" $6=-S $7=-ds... (3 Replies)
Discussion started by: swamymns
3 Replies

2. UNIX for Advanced & Expert Users

URGENT,URGENT- Need help tape drive installation

Hi, I am trying to attach tape drive to sun V890 running Solaris 9 on it. I have installed HBA(qlogic) in slot 1 of 0-8 slots and booted the system. I do not see HBAin prtdiag output. The tape drive is not attached to HBA. The tape drive I am going to attach is Sony AIT3. 1.How can I make... (3 Replies)
Discussion started by: sriny
3 Replies

3. Shell Programming and Scripting

Please help me out:-Its Urgent-C Shell Scripting

Hi Friends, I am new to this forum as well as new to shell scripting. I have a problem here and i need someone to solve this. Let us consider there are two processes(abc & def).There is a script which kills these two processes(i.e killtheprocess abc). Here abc is the argument . There... (0 Replies)
Discussion started by: Prince89
0 Replies

4. UNIX for Advanced & Expert Users

Umbrella script

Hi All, Can anybody help me to write the umbrella script for the following? I have three steps to do. STEP 1: CONVERT XML files to PS files STEP 2: CONVERT ALL PS FILES TO PDF FILES STEP 3: FTPING ALL PDF FILES TO THE SERVER. I have the codes for the above three steps. Now I... (3 Replies)
Discussion started by: sunitachoudhury
3 Replies

5. Shell Programming and Scripting

Urgent Korn Shell scripting Help Pleaaaase...

Hello All, Can someone help me to set a user's password from the script using korn shell. The password change is a one time password after user account creation. I tried providing the input file as the value for password field but password change requires tty so my password from an input file... (3 Replies)
Discussion started by: solaix14
3 Replies

6. Shell Programming and Scripting

it's urgent ! round number in perl scripting

my $number = 12.345673412 I need 3 digits after decimal or after dot(.) i mean , i need only 12.345 I used int(), ceil(), floor() but it gives me only 12 I need it. (10 Replies)
Discussion started by: pritish.sas
10 Replies

7. Shell Programming and Scripting

Need urgent help with PERL scripting

From the attached file I to need pick all rows that have AVG2 column value larger than 0.050, and write those values in to a separate file. Help me on how I pick the approp value & output them onto a file. Very Thanks in advance. :b: (5 Replies)
Discussion started by: tonystark
5 Replies

8. Shell Programming and Scripting

URGENT Reading a file and assessing the syntax shell script URGENT

I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies
KinoSearch1::Docs::Tutorial(3pm)			User Contributed Perl Documentation			  KinoSearch1::Docs::Tutorial(3pm)

NAME
KinoSearch1::Docs::Tutorial - sample indexing and search applications DESCRIPTION
The following sample code for invindexer.plx and search.cgi can be used to create a simple search engine. It requires the html presentation of the US Constitution included in the distribution for KinoSearch1, under "t/us_constitution". Note that a proper indexer for html documents would not rely on quick-n-dirty regular expressions for stripping tags, as this one does for the sake of brevity -- it would use a dedicated parsing module such as HTML::Parser. invindexer.plx #!/usr/bin/perl use strict; use warnings; use File::Spec; use KinoSearch1::InvIndexer; use KinoSearch1::Analysis::PolyAnalyzer; ### In order for invindexer.plx to work correctly, you must modify ### $source_dir, $path_to_invindex, and possibly $base_url. ### ### $source_dir must lead to the directory containing the US ### Constitution html files. ### ### $path_to_invindex is the future location of the invindex. ### ### $base_url should reflect the location of the us_constitution directory ### when accessed via a web browser. my $source_dir = ''; my $path_to_invindex = ''; my $base_url = '/us_constitution'; opendir( my $source_dh, $source_dir ) or die "Couldn't opendir '$source_dir': $!"; my @filenames = grep {/.html/} readdir $source_dh; closedir $source_dh or die "Couldn't closedir '$source_dir': $!"; ### STEP 1: Choose an Analyzer. my $analyzer = KinoSearch1::Analysis::PolyAnalyzer->new( language => 'en', ); ### STEP 2: Create a InvIndexer object. my $invindexer = KinoSearch1::InvIndexer->new( analyzer => $analyzer, invindex => $path_to_invindex, create => 1, ); ### STEP 3: Define fields. $invindexer->spec_field( name => 'title' ); $invindexer->spec_field( name => 'bodytext', vectorized => 1, ); $invindexer->spec_field( name => 'url', indexed => 0, ); foreach my $filename (@filenames) { next if $filename eq 'index.html'; my $filepath = File::Spec->catfile( $source_dir, $filename ); open( my $fh, '<', $filepath ) or die "couldn't open file '$filepath': $!"; my $content = do { local $/; <$fh> }; ### STEP 4: Start a new document. my $doc = $invindexer->new_doc; $content =~ m#<title>(.*?)</title>#s or die "couldn't isolate title in '$filepath'"; my $title = $1; $content =~ m#<div id="bodytext">(.*?)</div><!--bodytext-->#s or die "couldn't isolate bodytext in '$filepath'"; my $bodytext = $1; $bodytext =~ s/<.*?>/ /gsm; # quick and dirty tag stripping ### STEP 5: Set the value for each field. $doc->set_value( url => "$base_url/$filename" ); $doc->set_value( title => $title ); $doc->set_value( bodytext => $bodytext ); ### STEP 6 Add the document to the invindex. $invindexer->add_doc($doc); ### STEP 7 Repeat steps 3-5 for each document in the collection. } ### STEP 8 Finalize the invindex. $invindexer->finish; search.cgi #!/usr/bin/perl -T use strict; use warnings; use CGI; use List::Util qw( max min ); use POSIX qw( ceil ); use KinoSearch1::Searcher; use KinoSearch1::Analysis::PolyAnalyzer; use KinoSearch1::Highlight::Highlighter; my $cgi = CGI->new; my $q = $cgi->param('q'); my $offset = $cgi->param('offset'); my $hits_per_page = 10; $q = '' unless defined $q; $offset = 0 unless defined $offset; ### In order for search.cgi to work, $path_to_invindex must be modified so ### that it points to the invindex created by invindexer.plx, and ### $base_url may have to change to reflect where a web-browser should ### look for the us_constitution directory. my $path_to_invindex = ''; my $base_url = '/us_constitution'; ### STEP 1: Specify the same Analyzer used to create the invindex. my $analyzer = KinoSearch1::Analysis::PolyAnalyzer->new( language => 'en', ); ### STEP 2: Create a Searcher object. my $searcher = KinoSearch1::Searcher->new( invindex => $path_to_invindex, analyzer => $analyzer, ); ### STEP 3: Feed a query to the Search object. my $hits = $searcher->search($q); ### STEP 4: Arrange for highlighted excerpts to be created. my $highlighter = KinoSearch1::Highlight::Highlighter->new( excerpt_field => 'bodytext' ); $hits->create_excerpts( highlighter => $highlighter ); ### STEP 5: Process the search. $hits->seek( $offset, $hits_per_page ); ### STEP 6: Format the results however you like. # create result list my $report = ''; while ( my $hit = $hits->fetch_hit_hashref ) { my $score = sprintf( "%0.3f", $hit->{score} ); $report .= qq| <p> <a href="$hit->{url}"><strong>$hit->{title}</strong></a> <em>$score</em> <br> $hit->{excerpt} <br> <span class="excerptURL">$hit->{url}</span> </p> |; } $q = CGI::escapeHTML($q); # display info about the number of hits, paging links my $total_hits = $hits->total_hits; my $num_hits_info; if ( !length $q ) { # no query, no display $num_hits_info = ''; } elsif ( $total_hits == 0 ) { # alert the user that their search failed $num_hits_info = qq|<p>No matches for <strong>$q</strong></p>|; } else { # calculate the nums for the first and last hit to display my $last_result = min( ( $offset + $hits_per_page ), $total_hits ); my $first_result = min( ( $offset + 1 ), $last_result ); # display the result nums, start paging info $num_hits_info = qq| <p> Results <strong>$first_result-$last_result</strong> of <strong>$total_hits</strong> for <strong>$q</strong>. </p> <p> Results Page: |; # calculate first and last hits pages to display / link to my $current_page = int( $first_result / $hits_per_page ) + 1; my $last_page = ceil( $total_hits / $hits_per_page ); my $first_page = max( 1, ( $current_page - 9 ) ); $last_page = min( $last_page, ( $current_page + 10 ) ); # create a url for use in paging links my $href = $cgi->url( -relative => 1 ) . "?" . $cgi->query_string; $href .= ";offset=0" unless $href =~ /offset=/; # generate the "Prev" link; if ( $current_page > 1 ) { my $new_offset = ( $current_page - 2 ) * $hits_per_page; $href =~ s/(?<=offset=)d+/$new_offset/; $num_hits_info .= qq|<a href="$href">&lt;= Prev</a> |; } # generate paging links for my $page_num ( $first_page .. $last_page ) { if ( $page_num == $current_page ) { $num_hits_info .= qq|$page_num |; } else { my $new_offset = ( $page_num - 1 ) * $hits_per_page; $href =~ s/(?<=offset=)d+/$new_offset/; $num_hits_info .= qq|<a href="$href">$page_num</a> |; } } # generate the "Next" link if ( $current_page != $last_page ) { my $new_offset = $current_page * $hits_per_page; $href =~ s/(?<=offset=)d+/$new_offset/; $num_hits_info .= qq|<a href="$href">Next =&gt;</a> |; } # finish paging links $num_hits_info .= "</p> "; } # blast it all out print "Content-type: text/html "; print <<END_HTML; <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-type" content="text/html;charset=ISO-8859-1"> <link rel="stylesheet" type="text/css" href="$base_url/uscon.css"> <title>KinoSearch: $q</title> </head> <body> <div id="navigation"> <form id="usconSearch" action=""> <strong> Search the <a href="$base_url/index.html">US Constitution</a>: </strong> <input type="text" name="q" id="q" value="$q"> <input type="submit" value="=&gt;"> <input type="hidden" name="offset" value="0"> </form> </div><!--navigation--> <div id="bodytext"> $report $num_hits_info <p style="font-size: smaller; color: #666"> <em>Powered by <a href="http://www.rectangular.com/kinosearch/"> KinoSearch </a> </em> </p> </div><!--bodytext--> </body> </html> END_HTML COPYRIGHT
Copyright 2005-2010 Marvin Humphrey LICENSE, DISCLAIMER, BUGS, etc. See KinoSearch1 version 1.00. perl v5.14.2 2011-11-15 KinoSearch1::Docs::Tutorial(3pm)
All times are GMT -4. The time now is 04:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy