Sponsored Content
Top Forums Shell Programming and Scripting While loop - how to run processes one after another (2nd starts after first completes, and so on) Post 302771228 by RudiC on Wednesday 20th of February 2013 04:26:19 AM
Old 02-20-2013
Unless you present more details about what usearch does and how it works, we (and you) are doomed.
One - very inelegant - workaround would be to create nested loops (1 <= i <= 20) and (1 <= j <= 5) and run five instances of usearch at a time, wait for them to finish, and then go on with the next group.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run processes in parallel?

In a korn shell script, how can I run several processes in parallel at the same time? For example, I have 3 processes say p1, p2, p3 if I call them as p1.ksh p2.ksh p3.ksh they will run after one process finishes. But I want to run them in parallel and want to display "Process p1... (3 Replies)
Discussion started by: sbasak
3 Replies

2. UNIX for Advanced & Expert Users

Run away processes

Hi, My server runnning on SUN Solaris rel.5.5.1. I have been facing this issues for years. I have some Xbase databases running on the server. User is using emulation software to telnet to server for accessing application. If user logout application abnormally - by closing windows session, then... (2 Replies)
Discussion started by: lowtaiwah
2 Replies

3. UNIX for Advanced & Expert Users

script to run different shells which run different processes

Hi, Would like to ask the experts if anyone knows how to run a script like this: dtterm -title shell1 run process1 on shell1 dtterm -title shell2 run process2 on shell2 cheers! p/s: sorry if i used the wrong forum, quite concussed after watching world cup for several nights; but I... (2 Replies)
Discussion started by: mochi
2 Replies

4. UNIX for Dummies Questions & Answers

how can I run something as root (modprobe, to be exact) every time computer starts.

I have the root password for my box, but I'm ignorant. So, every time I start my computer, I have to run this command /sbin/modprobe fuse as su, so that I can do other stuff (like mount remote directories locally using sshfs) I guess there's some file, like .bashrc, only it's applicable... (4 Replies)
Discussion started by: tphyahoo
4 Replies

5. UNIX for Dummies Questions & Answers

Two questions. First one; What are the ways in which a program starts to run.

This is my first post here so hello everyone! I know that a command of the programs name can start a program and clicking on a icon in GUI can as well as a startup shell script but how do I educate myself of the method that starts an application? Does the GUI run a script? What are the ways/ way... (2 Replies)
Discussion started by: theKbStockpiler
2 Replies

6. UNIX and Linux Applications

how to run more than two processes parallely

I would like to call a function called CIRCLE which is further beind called by other function but in a loop that CIRCLE fuction is being called. And this CIRCLE function starts another process which takes 3 hours to complete again, if i put that process in nohup &, I can go to the next command... (2 Replies)
Discussion started by: venugopalsmartb
2 Replies

7. UNIX for Dummies Questions & Answers

Maximum no of processes that can run

Is there any limit in UNIX that only a MAXIMUM no of processes can run at a time? If so, it exceeds then what would be the error we would receive? (4 Replies)
Discussion started by: jansat
4 Replies

8. Shell Programming and Scripting

Array Variable being Assigned Values in Loop, But Gone when Loop Completes???

Hello All, Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....? I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping through a string containing some of these "Illegal Characters". Now... (5 Replies)
Discussion started by: mrm5102
5 Replies

9. Homework & Coursework Questions

When I run the script, the cursor starts on the wrong line?

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: It's a shell script using a looping logic, trap, tput, if, while. Most of the scripts in this book aren't written... (2 Replies)
Discussion started by: ckleinholz
2 Replies

10. Shell Programming and Scripting

Need to write a shell script that starts one, then kills it, then starts another?

This is on a CentOS box, I have two scripts that need to run in order. I want to write a shell script that calls the first script, lets it run and then terminates it after a certain number of hours (that I specify of course), and then calls the second script (they can't run simultaneously) which... (3 Replies)
Discussion started by: btramer
3 Replies
Lexical::SealRequireHints(3pm)				User Contributed Perl Documentation			    Lexical::SealRequireHints(3pm)

NAME
Lexical::SealRequireHints - prevent leakage of lexical hints SYNOPSIS
use Lexical::SealRequireHints; DESCRIPTION
This module works around two historical bugs in Perl's handling of the "%^H" (lexical hints) variable. One bug causes lexical state in one file to leak into another that is "require"d/"use"d from it. This bug, [perl #68590], was present from Perl 5.6 up to Perl 5.10, fixed in Perl 5.11.0. The second bug causes lexical state (normally a blank "%^H" once the first bug is fixed) to leak outwards from "utf8.pm", if it is automatically loaded during Unicode regular expression matching, into whatever source is compiling at the time of the regexp match. This bug, [perl #73174], was present from Perl 5.8.7 up to Perl 5.11.5, fixed in Perl 5.12.0. Both of these bugs seriously damage the usability of any module relying on "%^H" for lexical scoping, on the affected Perl versions. It is in practice essential to work around these bugs when using such modules. On versions of Perl that require such a workaround, this module globally changes the behaviour of "require", including "use" and the implicit "require" performed in Unicode regular expression matching, so that it no longer exhibits these bugs. The workaround supplied by this module takes effect the first time its "import" method is called. Typically this will be done by means of a "use" statement. This should be done as early as possible, because it only affects "require"/"use" statements that are compiled after the workaround goes into effect. For "use" statements, and "require" statements that are executed immediately and only once, it suffices to invoke the workaround when loading the first module that will set up vulnerable lexical state. Delayed-action "require" statements, however, are more troublesome, and can require the workaround to be loaded much earlier. Ultimately, an affected Perl program may need to load the workaround as very nearly its first action. Invoking this module multiple times, from multiple modules, is not a problem: the workaround is only applied once, and applies to everything subsequently compiled. This module is implemented in XS, with a pure Perl backup version for systems that can't handle XS modules. The XS version has a better chance of playing nicely with other modules that modify "require" handling. The pure Perl version can't work at all on some Perl versions; users of those versions must use the XS. PERL VERION DIFFERENCES
The history of the "%^H" bugs is complex. Here is a chronological statement of the relevant changes. Perl 5.6.0 "%^H" introduced. It exists only as a hash at compile time. It is not localised by "require", so lexical hints leak into every module loaded, which is bug [perl #68590]. The "CORE::GLOBAL" mechanism doesn't work cleanly for "require", because overriding "require" loses the necessary special parsing of bareword arguments to it. As a result, pure Perl code can't properly globally affect the behaviour of "require". Pure Perl code can localise "%^H" itself for any particular "require" invocation, but a global fix is only possible through XS. Perl 5.7.2 The "CORE::GLOBAL" mechanism now works cleanly for "require", so pure Perl code can globally affect the behaviour of "require" to achieve a global fix for the bug. Perl 5.8.7 When "utf8.pm" is automatically loaded during Unicode regular expression matching, "%^H" now leaks outward from it into whatever source is compiling at the time of the regexp match, which is bug [perl #73174]. It often goes unnoticed, because [perl #68590] makes "%^H" leak into "utf8.pm" which then doesn't modify it, so what leaks out tends to be identical to what leaked in. If [perl #68590] is worked around, however, "%^H" tends to be (correctly) blank inside "utf8.pm", and this bug therefore blanks it for the outer module. Perl 5.9.4 "%^H" now exists in two forms. In addition to the relatively ordinary hash that is modified during compilation, the value that it had at each point in compilation is recorded in the compiled op tree, for later examination at runtime. It is in a special representation- sharing format, and writes to "%^H" are meant to be performed on both forms. "require" does not localise the runtime form of "%^H" (and still doesn't localise the compile-time form). A couple of special "%^H" entries are erroneously written only to the runtime form. Pure Perl code, although it can localise the compile-time "%^H" by normal means, can't adequately localise the runtime "%^H", except by using a string eval stack frame. This makes a satisfactory global fix for the leakage bug impossible in pure Perl. Perl 5.10.1 "require" now properly localises the runtime form of "%^H", but still not the compile-time form. A global fix is once again possible in pure Perl, because the fix only needs to localise the compile-time form. Perl 5.11.0 "require" now properly localises both forms of "%^H", fixing [perl #68590]. This makes [perl #73174] apparent without any workaround for [perl #68590]. The special "%^H" entries are now correctly written to both forms of the hash. Perl 5.12.0 The automatic loading of "utf8.pm" during Unicode regular expression matching now properly restores "%^H", fixing [perl #73174]. BUGS
The operation of this module depends on influencing the compilation of "require". As a result, it cannot prevent lexical state leakage through a "require" statement that was compiled before this module was invoked. Where problems occur, this module must be invoked earlier. SEE ALSO
perlpragma AUTHOR
Andrew Main (Zefram) <zefram@fysh.org> COPYRIGHT
Copyright (C) 2009, 2010, 2011, 2012 Andrew Main (Zefram) <zefram@fysh.org> LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-04-08 Lexical::SealRequireHints(3pm)
All times are GMT -4. The time now is 08:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy