Sponsored Content
Top Forums Shell Programming and Scripting Trigger script based on condition Post 303039474 by RudiC on Monday 7th of October 2019 03:53:28 AM
Old 10-07-2019
What's happening? What doesn't work? Any errors / messages / misbehaviour?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk script to split a file based on the condition

I have the file with the records like 4234234 US phone 3244234 US cup 2342342 CA phone 8947234 US phone 2389472 CA cup 2348972 US maps 3894234 CA phone I want the records with (US,phone) as record to be in one file, (Us, cup) in another file and (CA,cup) to be in another I mean all... (12 Replies)
Discussion started by: superprogrammer
12 Replies

2. Shell Programming and Scripting

Shell script call from a DB trigger

Has anybody been able to execute a shell script call from a database trigger? If so what are the steps to execute it? Do we have any specific packages in Oracle? Reards, Rahul. (1 Reply)
Discussion started by: rahulrathod
1 Replies

3. Shell Programming and Scripting

Check if trigger Script is running

HI, I have a script which will be running all the time...it is like a trigger.. wakesup every 10 minutes(trigger.sh) executes, and I want to write another script which monitors this script every one hour and if it finds that trigger script is not running it should start it and exit...and here... (9 Replies)
Discussion started by: mgirinath
9 Replies

4. Shell Programming and Scripting

trigger a script based on the run status of another scipt

Im a newbee.. I have a script which runs few times daily. I want to write another script which should pick up the latest log generated from the last run of the first job and trigger a thrid script if the first script runs successfuly. Please help... Cheers (1 Reply)
Discussion started by: Athena
1 Replies

5. UNIX for Dummies Questions & Answers

Can we trigger an shell script on an event

Hi, My program A updates a log called logA. I have a shell script S that is responsible to send emails reading from the log. I want to trigger execution of the script whenever there is an update to the log. Thanks in advance. (8 Replies)
Discussion started by: cv_pan
8 Replies

6. Shell Programming and Scripting

How to trigger a script based on another log file.

I need to execute my script as soon as one log file arrives. This log file is named as logyymmdd. I need to add trigger to my script based on this logfile. Please guide. (1 Reply)
Discussion started by: nishigupta
1 Replies

7. Shell Programming and Scripting

Trigger with condition

If test.ksh is successful then I have a sequence of script which needs to execute automatically. Is it possible to capture the return code to execute the next script automatically? what is better way of doing this. (4 Replies)
Discussion started by: zooby
4 Replies

8. UNIX for Dummies Questions & Answers

Condition based on Timestamp (Date/Time based) from logfile (Epoch seconds)

Below is the sample logfile: Userids Date Time acb Checkout time: 2013-11-20 17:00 axy Checkout time: 2013-11-22 12:00 der Checkout time: 2013-11-17 17:00 xyz Checkout time: 2013-11-19 16:00 ddd Checkout time: 2013-11-21 16:00 aaa Checkout... (9 Replies)
Discussion started by: asjaiswal
9 Replies

9. Shell Programming and Scripting

Automatic script trigger

Hi, I'm looking for a way to solve the following scenario: A shell should automatically trigger / run when a text file is placed or present at a specific location. My idea - to create a cron / anacron for every minute and inside that i will call a temp script. Temp script will move to my... (9 Replies)
Discussion started by: Gautham
9 Replies

10. Shell Programming and Scripting

To trigger script on particular instance

Hi Guys, I have a main_script.sh which runs every day and scheduled in crontab. in the main script i read data from config file test.config apple mango orange main_script.sh for i in `cat test.config` do if then echo 'Apple' (3 Replies)
Discussion started by: Master_Mind
3 Replies
TIPS(1) 						User Contributed Perl Documentation						   TIPS(1)

NAME
PDL::Tips - Small tidbits of useful arcana. Programming tidbits and such. SYNOPSIS
use PDL; # Whatever happens here. DESCRIPTION
This page documents useful idioms, helpful hints and tips for using Perl Data Language v2.0. Help Use "help help" within perldl or the "pdldoc" program from the command line for access to the PerlDL documentation. HTML versions of the pages should also be present, in the HtmlDocs/PDL directory of the PDL distribution. To find this directory, try the following perldl> foreach ( map{"$_/PDL/HtmlDocs"}@INC ) { p "$_ " if -d $_ } Indexing idioms The following code normalizes a bunch of vectors in $a. This works regardless of the dimensionality of $a. $a /= $a->sumover->dummy(0); What is actually happening? If you want to see what the code is actually doing, try the command PDL::Core::set_debugging(1); somewhere. This spews out a huge amount of debug info for PDL into STDOUT. It is planned to eventually make this redirectable and the messages selectable more accurately. Many of the messages come from "Basic/Core/pdlapi.c" and you can look at the source to see what is going on. If you have any extra time to work on these mechanisms, infrom the pdl-porters mailing list. Memory savings If you are running recursively something that selects certain indices of a large piddle, like while(1) { $inds = where($a>0); $a = $a->index($inds); $b = $b->index($inds); func($b,$a); } If you are not writing to $b, it saves a lot of memory to change this to $b = $b->index($inds)->sever; The new method "sever" is a causes the write-back relation to be forgotten. It is like copy except it changes the original piddle and returns it). Of course, the probably best way to do the above is $inds = xvals ($a->long); while(1) { $inds0 = where($a>0); $inds1 = $inds->index($inds)->sever; $a = $a0->index($inds1); $b = $b->index($inds1)->sever; func($b,$a); } which doesn't save all the temporary instances of $a in memory. See "mandel.pl" in the Demos subdirectory of the PerlDL distribution for an example. PP speed If you really want to write speedy PP code, the first thing you need to do is to make sure that your C compiler is allowed to do the necessary optimizations. What this means is that you have to allow as many variables as possible to go into registers: loop(a) %{ $a() += $COMP(foo_member) * $b() %} expands to for(i=0; i<10000; i++) { a[i] += __privtrans->foo_member * b[i]; } is about the worst you can do, since your C compiler is not allowed to assume that "a" doesn't clobber "foo_member" which completely inhibits vectorization. Instead, do float foo = $COMP(foo_member); loop(a) %{ $a() += foo * $b(); %} This is not a restriction caused by PP but by ANSI C semantics. Of course, we could copy the struct into local varibles and back but that could cause very strange things sometimes. There are many other issues on organizing loops. We are currently planning to make PP able to do fixed-width things as well as physical piddles (where looping over the first dimensions would be cheaper as there are less distinct increments, which might make a difference on machines with a small number of registers). AUTHOR
Copyright (C) Tuomas J. Lukka 1997. All rights reserved. Duplication in the same form and printing a copy for yourself allowed. perl v5.12.1 2009-10-17 TIPS(1)
All times are GMT -4. The time now is 07:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy