01-09-2013
I just want kill the running command and execute the next command.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I hope someone can shed any light on this mystery.
I am trying to run the following command:
su userID -c
remsh server -l userid -n "awk -F^ '\$4 == \"SMITH\"' /tmp/infromational/version74b/LIVE/TEMPORARY/ABCfiles/HLC_Database_File.bat|head -1" > /tmp/variant/45BV32/var/store13.logfnd
I... (15 Replies)
Discussion started by: Korn0474
15 Replies
2. Shell Programming and Scripting
Hi All,
I have list of 100 table names in a file, how to read table name from and pass to DB2 export command and run for all tables in loop.
Please help me with script.
db2 EXPORT TO ~/data_export/<table name from file>.ixf OF IXF MESSAGES messages.txt "SELECT * FROM ITG.<Table Name... (4 Replies)
Discussion started by: srimitta
4 Replies
3. Shell Programming and Scripting
Hi everyone,
when executing this command in unix:
echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error.
here is content of my script:
tdbsrvr$ vi hc.sh
"hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies
4. UNIX for Dummies Questions & Answers
Hey, I am trying to write a script that will open all of my session windows, and then secure shell into the appropriate server in the new windows. Seems simple, but I cant get it to work! Please help! :confused: (1 Reply)
Discussion started by: sojo1024
1 Replies
5. Shell Programming and Scripting
Hi,
Not sure what the issue is here, but when i run the script. A simple copy command, it does not find the cp command ? See scrpt below :
#!/bin/sh
set -x
#############################################
# Backup Processes #... (4 Replies)
Discussion started by: venhart
4 Replies
6. Shell Programming and Scripting
The command is:
sic -h irc.freenode.net 2>&1 | tee -a irc.log
Where sic is an IRC client, and I'm piping the output to tee in order to log my IRC sessions.
I'm trying to handle reconnects by running it in a while loop in the shell process and cat the initial commands into sic's stdin.
I... (1 Reply)
Discussion started by: guitarscn
1 Replies
7. Shell Programming and Scripting
Dear All,
Writing a script in which I want to run a command in background and keep it running even script is finished.
I have tried like below,
`truss -p <pid> >> & /tmp/log &`
But doesnt work.. script goes running and nothing in log file. (7 Replies)
Discussion started by: Deei
7 Replies
8. Shell Programming and Scripting
Hi,
I have run a lot of commands one after one,
but I can't run them simultaneous.
One command has to run and when finished second command has to run etc.
Also I would like to save all the outputs created by the commands in a file.
The commands can sometimes take hours, so it is also... (10 Replies)
Discussion started by: misterx12345
10 Replies
9. Shell Programming and Scripting
hello
i have write a script which can create username + password
#!/bin/bash
# Script to add a user to Linux system
if ; then
read -p "Enter username : " username
read -s -p "Enter password : " password
egrep "^$username" /etc/passwd >/dev/null
if ; then... (3 Replies)
Discussion started by: nimafire
3 Replies
10. Shell Programming and Scripting
Dear folks
I have two data set which there names are "final.map" and "1.geno" and look like this structures:
final.map:
gi|358485511|ref|NC_006088.3| 2044
gi|358485511|ref|NC_006088.3| 2048
gi|358485511|ref|NC_006088.3| 2187
gi|358485511|ref|NC_006088.3| 17654
... (2 Replies)
Discussion started by: sajmar
2 Replies
LEARN ABOUT OPENSOLARIS
scds_timerun
scds_timerun(3HA) Sun Cluster HA and Data Services scds_timerun(3HA)
NAME
scds_timerun - execute a given command in a given amount of time
SYNOPSIS
cc [flags...] -I /usr/cluster/include file -L /usr/cluster/lib -l dsdev
#include <rgm/libdsdev.h>
scha_err_t scds_timerun(scds_handle_t handle, const char *command,
time_t timeout, int signal, int *cmd_exit_code
DESCRIPTION
The scds_timerun() function executes a specified command using hatimerun(1M). If the command does not complete within the allotted time
period,which is specified by the timeout argument, scds_timerun() sends a signal, specified by the signal argument, to kill it.
The command argument does not support I/O redirection. However, you can write a script to perform redirection and then identify this
script in the command argument as the command for scds_timerun() to execute.
PARAMETERS
The following parameters are supported:
handle The handle returned from scds_initialize(3HA)
command String containing the command to run
timeout Time, in seconds, allotted to run the command
signal Signal to kill the command if it is still running when the timeout expires. If signal = -1, then SIGKILL is used. See
signal(3HEAD).
cmd_exit_code Return code from execution of the command
RETURN VALUES
The scds_timerun() function returns the following:
0 The function succeeded.
non-zero The function failed.
ERRORS
SCHA_ERR_NOERR The command executed and cmd_exit_code contains the child program's exit status.
SCHA_ERR_INTERNAL The timeout did not occur, but some other error was detected by scds_timerun() that was not an error
detected by the child program. Or hatimerun(1M) caught the signal SIGTERM.
SCHA_ERR_INVAL There was an invalid input argument.
SCHA_ERR_TIMEOUT The timeout occurred before the command specified by the command argument finished executing.
See scha_calls(3HA) for a description of other error codes.
FILES
/usr/cluster/include/rgm/libdsdev.h
Include file
/usr/cluster/lib/libdsdev.so
Library
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWscdev |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO
hatimerun(1M), scds_initialize(3HA), scha_calls(3HA), signal(3HEAD), attributes(5)
Sun Cluster 3.2 7 Sep 2007 scds_timerun(3HA)