I want to use find to locate files with two different extensions, and run a grep on the results. The closest I have gotten is incredibly slow and ugly:
for i in `ls -laR|egrep -e '(.js|.css)'`; do find . -name $i -print|xargs grep -H searchBg; done;
This method makes my eyes bleed. Help! ;)
... (2 Replies)
Dear All,
The sqlplus 'Accept' command is not waiting for user input when I include the command within a shell script.
Note: The 'Accept' command is working fine if I execute it in a SQLPLUS Prompt.
Please fins the below sample script which i tried.
SCRIPT:
--------
#!... (4 Replies)
I have a shell script like this:
#!/bin/sh
$PYTHON MetarDecoder.py < ../data/mtrs/arg1/arg2
And I'm calling it with this in perl:
my $output = `./metar_parse.sh --options`;
It's successful when I put in actual values for arg1 and arg2 in the shell script, but I'd like to pass arguments... (1 Reply)
Hi Friends,
i am creating a shell script which is accepting file name as input parameter from Java and invoking finacle service.
The service will accpet text file,B2k_session id,etc and upload the text file data in finacle database.
My shell script looks like this:-
#! /bin/ksh... (2 Replies)
I want a shell script that accepts user input simultaneously when performing other tasks. Example: A shell script should echo some messages on the console and when the user presses some keys it should respond to that action.
say, when user presses the key
A - more information should be printed... (2 Replies)
Greetings all,
On a RedHat System - I am issuing a command from script.sh that will add a file extension to a listing of files in a directory. It works, but I need to script from having an extension added as well.
Here is what I have tried to no luck:
for file in `ls * | awk ' /\./{print... (6 Replies)
I have a script that looks like this:sed -f myfile.sed $1 > $1.out called myscript and would like to change it so the parameter isn't necessary: ls *.idx | myscript | xargs some_command What do I need to add so it can run either way?
TIA
---------- Post updated at 09:41 AM ----------... (1 Reply)
Discussion started by: wbport
1 Replies
LEARN ABOUT DEBIAN
sam_register
SAM_REGISTER(3) Corosync Cluster Engine Programmer's Manual SAM_REGISTER(3)NAME
sam_rehister - Register component for health checking
SYNOPSIS
#include <corosync/sam.h>
cs_error_t sam_register (unsigned int *instance_id);
DESCRIPTION
The sam_register function is used to register a process for healthchecking. If recovery policy is set to SAM_RECOVERY_POLICY_RESTART and
recovery action will be taken, the new process instance will begin execution at the next code line after this function is called.
This function can be called only once and SAM must be initialized by sam_initialize(3) function.
The instance_id argument is a pointer to a value storing the current iteration instance. If this parameter is NULL, no instance_id is
returned. and then, no instance_id will be returned. This value starts at 0 for the first iteration instance, and increases by 1 each time
a recovery restart is executed. After reaching MAX_INT, the instance_id will reset to 0.
The placement of this function is important because after it is called, the process id will change.
After registration, event driven health checking is not running.
RETURN VALUE
This call return CS_OK value if successful, otherwise and error is returned.
ERRORS
CS_ERR_BAD_HANDLE
health checking was not started by calling sam_start(3) function.
CS_ERR_LIBRARY
internal library call failed. This can be one of pipe creation or fork. It's possible to get more information from errno.
SEE ALSO sam_start(3), sam_initialize(3), sam_hc_callback_register(3)corosync Man Page 12/01/2009 SAM_REGISTER(3)