Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Unix coding for triggering informatica Post 302580698 by otheus on Friday 9th of December 2011 10:06:15 AM
Old 12-09-2011
A more portable solution via perl:
Code:
#!/usr/bin/perl

use POSIX qw(strftime);
my $file = shift @ARGV;
stat $file;
die "File $file does not exist or cannot be read: $!"
  unless -f _ || -r _;
die "File $file cannot be stat'd: $!"
  unless stat _;

# Calculate in seconds the time it was yesterday (24 hours ago) at 7pm.
my $_7pm_last_night = ( strftime "%s",(0,0,19,(localtime(time - 24*60*60))[3..8]));

# compare the file's mtime timestamp with that time and exit accordingly
exit ( (stat(_))[9] > $_7pm_last_night  ?  0  : 1 );

# exits with 0 if the file exists and has been updated since 7pm, 1 otherwise


Last edited by otheus; 12-13-2011 at 12:53 PM.. Reason: first version didnt work
This User Gave Thanks to otheus For This Post:
 

9 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Urgent Need for Assistance: Triggering Windows bat files from UNIX

Hello, Is there a way to trigger a Windows bat file or program on a different machine from a different UNIX server using KSC file? I hope you can assist me with this. Thanks! (0 Replies)
Discussion started by: punyenye
0 Replies

2. UNIX and Linux Applications

Informatica - Unix Problem

hi guys, I have to ftp an empty text file dim_trigger.txt form 1 server to another. The target server is mtiftp and i have defined the username and password. Below is the shellscript thats in a file called dim_trigger.ksh #!/bin/ksh # # FTP Bo trigger # HOST= 'mtiftp' USER=... (0 Replies)
Discussion started by: fgene1
0 Replies

3. Shell Programming and Scripting

Triggering my Unix script....

Hi All, i dont have any idea about perl scripting... i need some suggestion so that i can put my effort to find out the solution:D let me explain....one of my tedious task which will taken care by Unix shell script which i prepared. its a kind of routine work that i am running the... (4 Replies)
Discussion started by: Shahul
4 Replies

4. UNIX for Dummies Questions & Answers

Call unix script through informatica mapping

hi, i want to call unix script from transformations used in informatica mapping? can we do it in any way? Please reply ASAP. We cant use Storep procedure transformation Thanks in Advance nishith (0 Replies)
Discussion started by: Nishithinfy
0 Replies

5. UNIX for Advanced & Expert Users

automation of Informatica jobs using Unix

1.How will you do automation of Informatica jobs using Unix ? 2. How u run workflow from Unix? :) (2 Replies)
Discussion started by: kamesh83
2 Replies

6. Solaris

Triggering UNIX command from Web Browser

HI, I want to trigger a UNIX command from a web browser page. The web browser will have few steps which will generate the UNIX command and then it should connect to the UNIX box and fire that command. Here we are using Sun Solaris UNIX. Can you please suggest me how can i get... (6 Replies)
Discussion started by: dear_abhi2007
6 Replies

7. Shell Programming and Scripting

UNIX script to check file and start the informatica server

Hi Rockers, I hope u r dng good one. I have a one question is in unix with informatica . I need a unix script to check whether particular file exists in the folder , If it means we have a informatica server , so we can start the informatica server by accessing that file. Every week we have... (0 Replies)
Discussion started by: gurukrishnan
0 Replies

8. UNIX and Linux Applications

UNIX help with informatica

Guys, I have a requirement.Please suggest the way i can : A script is being used to generate a file and send a mail to a source team if the feed for informatica jobs have not reached the server. If the file has not reached the server,the informatica jobs touch 0 byte file after 3 hours and... (2 Replies)
Discussion started by: aliva Dash
2 Replies

9. Shell Programming and Scripting

Triggering UNIX Script from a JAVA program

Hi I am trying to implement one program, where JAVA needs to trigger the backend UNIX script. Tried with options like String cmdArray = {"/bin/ksh","-c","/SCRIPT_ABSOLUTE_PATH/sampleScript.ksh /FILE_ABSOLUTE_PATH Test_File.dat TEST E SFTP"} When I trigger the script from front end with... (1 Reply)
Discussion started by: karumudi7
1 Replies
PROCBATCH(8)						    InterNetNews Documentation						      PROCBATCH(8)

NAME
procbatch - Process an INN funnel file or innfeed-dropped file SYNOPSIS
procbatch [-hquv] [-c [-s spooldir]] [-d outdir] [-e peer] [-m [-t backlogdir]] batchfile DESCRIPTION
procbatch will take an INN funnel or innfeed-dropped file and split it up by host for direct processing with innfeed or innxmit. While funnel files will normally only be of interest after a crash, innfeed may drop articles for a variety of reasons, not all of which indicate a fundamental problem. For example, innfeed may drop articles when started and stopped in quick succession while INN processes a large number of control messages (a temporary indisposition), or when INN feeds it articles for a site that isn't in innfeed.conf (a misconfiguration). Every running innfeed opens a file named innfeed-dropped.<id>, which should normally always be zero length and deleted on exit. If there are non-zero length files, innfeed has dropped some articles, and those dropped article files have to be processed or those articles will never be sent to peers. Though news.daily automatically process these files (invoking procbatch), it is also possible to do that manually. First make sure that the file doesn't correspond to a currently running innfeed, for example by calling "ctlinnd flush innfeed!". An INN funnel file, or an innfeed-dropped file, will usually be of the format: pathname message-id peer1 peer2 peer3 ... where pathname can alternatively be a storage API token. procbatch will break this file up into files named peer1.tmp, peer2.tmp, peer3.tmp, etc. of the format: pathname message-id These tape files will be sorted and stripped of duplicate entries. Simply renaming them to peer1, peer2, peer3, etc. in a running innfeed's backlog directory will cause them to be picked up automatically by innfeed every backlog-newfile-period seconds (as set in in innfeed.conf). Use the -m flag to have procbatch rename and move them into place automatically. After running procbatch, you may want to make sure that every generated backlog file has a corresponding ".lock" file. Otherwise, innfeed doesn't have that site configured as a peer, meaning your innfeed.conf may need fixing. OPTIONS
-c Check for the existence of an article before writing references to it to the tape files. Currently, this option can only be used with a tradspool article store. Using it with any other spool format will lead to all articles being dropped. -d outdir Put the output file(s) into the directory outdir (defaults to pathtmp as set in inn.conf). When also specifying -m, the temporary output files will still be put here before being moved into their final location. -e peer Only process entries for peer. -h Display a short help screen. -m Directly append to tape files in innfeed's backlog directory. -q Quiet mode: only display error messages. -s spooldir Use spooldir as the location of the article spool (defaults to patharticles as set in inn.conf). This option has an effect only on a tradspool storage system when also specifying -c. -t backlogdir Use backlogdir as the location of the innfeed backlog directory (the directory where the created tape files will be put). Defaults to pathspool/innfeed. This option has an effect only when also specifying -m. -u Unlink the input batchfile after processing. -v Add verbosity. EXAMPLES
Take the file innfeed-dropped.B012345, process its lines appending to tapefiles in innfeed's backlog directory, and remove it when done. Be verbose while doing so: procbatch -umv innfeed-dropped.B012345 Go through innfeed-dropped.B012345 saving entries for "peer1" in /tmp/peer1.tmp, but only if the articles are still available in the local tradspool: procbatch -e peer1 -d /tmp -c innfeed-dropped.B012345 BUGS
procbatch should be able to check for the existence of articles with any kind of article store, possibly using grephistory. HISTORY
procbatch was written by James Brister and improved for speed by Clayton O'Neill. This manual page was written by Florian Schlichting, with the help of a memo by Russ Allbery. $Id: procbatch.pod 9372 2011-09-04 09:22:23Z iulius $ SEE ALSO
filechan(8), innfeed(8), innxmit(8), news.daily(8). INN 2.5.3 2011-09-18 PROCBATCH(8)
All times are GMT -4. The time now is 09:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy