Sponsored Content
Top Forums Shell Programming and Scripting Writing a UNIX script from LOG to provide return code. Post 302512903 by sk72 on Monday 11th of April 2011 09:34:58 PM
Old 04-11-2011
Thanks KenJackson!!

This code looks very straight-forward but the only problem is this particular log file will have entries for past executions as well. I am going to try to keep separate log file for different 'Events' to avoid the log file from capturing mutiple 'Event' executions at the same time.

I am jut throwing this idea out there, can we have a secondary log file which is generated from the master log file but it only captures the current execution with an override function? if this is somewhat possible we can potentially have the script you built to go against the secondary log file all the time.

This does sound a little complex to me, let me know what you think?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help in writing a unix script

OS: Solaris Shell : KSH Please help me in writing a script that captures a error message from a log file ( which updates continiously ) and send an email alert as soon as the systems throws a error message into that log. i.e With out monitoring the log Thanks in advance.. (1 Reply)
Discussion started by: pray44u
1 Replies

2. Shell Programming and Scripting

return code of a unix command

How to find out whether the command I executed is successful or unsuccessful(at commandlinet) Eg: say i execute the following command at command line rm * How do i find out whether my previous command is a success or failure. Thankyou. Best Regards, Ram. (1 Reply)
Discussion started by: ramky79
1 Replies

3. Shell Programming and Scripting

return code from script

hey all, I have a simple script #!/bin/bash ./cron.sh test_a.txt & ./cron.sh test_b.txt & wait I want to invoke another program based on the return status of the above calls. How am I were to get that? Thanks! (2 Replies)
Discussion started by: mpang_
2 Replies

4. UNIX for Dummies Questions & Answers

Perl Unix Script Writing

Hi Folks, I posted a few days ago, thanks for the responses. My original question was for renaming files of sort 3p2325294.dgn in a directory containing multiple files. I need to drop the first 2 characters and the last in a unix script using Perl. How does it differ from using the Unix... (1 Reply)
Discussion started by: Dinkster
1 Replies

5. Shell Programming and Scripting

help writing this unix script

I am working on writing scripts. Here is a script I need help with. I have also wrote what I think it is. I would really appreciate any help that I can get. Create an executable script file called "newname" that will perform the followings: 1. Rename a file upon the user's request. If the... (2 Replies)
Discussion started by: wiggles
2 Replies

6. Shell Programming and Scripting

need help writing this unix script

Create an executable script file called "newname" that will perform the followings: 1. Rename a file upon the user's request. If the file exists, prompt the user for confirmation before renaming the file. The screen should prompt the user for a. "Name of file you want to rename." Use the "\c"... (7 Replies)
Discussion started by: wiggles
7 Replies

7. Shell Programming and Scripting

Pointers on writing a unix script

Hi All, I am writing a unix shell script. I have a file called Results.txt which stores 4 fields separated by pipe. i.e. a pipe delimited file. I want to loop through each record of this file and store each of these 4 fields into variables. I have read can be done through awk but I have never... (7 Replies)
Discussion started by: shwetainnani
7 Replies

8. HP-UX

return code from oracle to unix script

Hi I'm writing a shell script that connects to oracle database and fires query to check the availability of data in a table. In case of no data found then what will be the return code and how to handle in that in variable. Kindly provide with an example for better understanding... Thanks... (1 Reply)
Discussion started by: ksailesh
1 Replies

9. Shell Programming and Scripting

Unix return code example

Hi, Does anyone here can guide me to understand how is return code works in a parent-child relation with a simple example? I have a request to build the script with return code in a child script, but i want to understand how does child script can return a code to the parent, stated if its... (4 Replies)
Discussion started by: khchong
4 Replies

10. Shell Programming and Scripting

Need to get return code from mutt if an address is invalid/undeliverable from Unix shell script

I am using mutt on ksh Unix to send emails to addresses plucked from the database. If the "To:" email address is not longer valid and so the email is not sent to the "To:" recipient, but is sent to the valid cc address, I need to be able to get an error code returned to the shell script so that... (3 Replies)
Discussion started by: jzuber
3 Replies
multithreading_support(3)					       Coin						 multithreading_support(3)

NAME
multithreading_support - Multithreading Support in Coin The support in Coin for using multiple threads in application programs and the Coin library itself, consists of two main features: o Coin provides platform-independent thread-handling abstraction classes. These are classes that the application programmer can freely use in her application code to start new threads, control their execution, work with mutexes and do other tasks related to handling multiple threads. The classes in question are SbThread, SbMutex, SbStorage, SbBarrier, SbCondVar, SbFifo, SbThreadAutoLock, SbRWMutex, and SbTypedStorage. See their respective documentation for the detailed information. The classes fully hides the system-specific implementation, which is either done on top of native Win32 (if on Microsoft Windows), or over POSIX threads (on UNIX and UNIX-like systems). o The other aspect of our multi-threading support is that Coin can be specially configured so that rendering traversals of the scene graph are done in a thread-safe manner. This means e.g. that it is possible to have Coin render the scene in parallel on multiple CPUs for multiple rendering pipes, to better take advantage of such high-end systems (like CAVE environments, for instance). Thread-safe render traversals are off by default, because there is a small overhead involved which would make rendering (very) slightly slower on single-threaded invocations. To get a Coin library built with thread-safe rendering, one must actively re-configure Coin and build a special, local version. For configure-based builds (UNIX and UNIX-like systems, or with Cygwin on Microsoft Windows) this is done with the option '--enable-threadsafe' to Autoconf configure. For how to change the configuration and re-build with Visual Studio, get in touch with us at 'coin- support@coin3d.org'. There are some restrictions and other issues which it is important to be aware of: o We do not yet provide any support for binding the multi-threaded rendering support into the SoQt / SoWin / etc GUI bindings, and neither do we provide bindings against any specific library that handles multi-pipe rendering. This means the application programmer will have to possess some expertise, and put in some effort, to be able to utilize multi-pipe rendering with Coin. o Rendering traversals is currently the only operation which we publicly support to be thread-safe. There are other aspects of Coin that we know are thread-safe, like most other action traversals beside just rendering, but we make no guarantees in this regard. o Be careful about using a separate thread for changing Coin structures versus what is used for the application's GUI event thread. We are aware of at least issues with Qt (and thereby SoQt), where you should not modify the scene graph in any way in a thread separate from the main Qt thread. This because it will trigger operations where Qt is not thread-safe. Since: Coin 2.0 Version 3.1.3 Wed May 23 2012 multithreading_support(3)
All times are GMT -4. The time now is 05:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy