04-16-2013
thanks, I know a little about redirection from the command line, is it the same when I do it from a script? I can't get it to work
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello
i need a shell script to create 100 users i am running hp-ux.........
startegy is something like this
craete a shell script
!/bin/ksh
counter=1
while
do
{
useradd usr$counter
passwd usr$counter
# here begins my problem when i say passwd usr$counter
#it again prompts... (9 Replies)
Discussion started by: xiamin
9 Replies
2. Shell Programming and Scripting
ftp -n -v <<EOF
verbose
open 3.57.40.79
user infodvlp pr0gram
ascii
lcd /home/a501420038/GLA/Success_Load/
cd /ftp/SrcFiles/csg/InstruAsia/
get AU_Success_Log.txt
close
quit
EOF
Please help on this, this gives the out put "AU_Success_Log.txt?" As question mark in the last what will... (1 Reply)
Discussion started by: a501420038
1 Replies
3. Shell Programming and Scripting
I need a perl script which will create an output file after comparing two diff file in a directory path:
/export/home/abc/file1
/export/home/abc/file2
File Format: <IP>TAB<DeviceName><TAB>DESCRIPTIONS
file1:
10.1.2.1.3<tab>abc123def<tab>xyz.mm1.ppp.... (2 Replies)
Discussion started by: ricky007
2 Replies
4. Shell Programming and Scripting
OS : Linux 2.6.9-67 - Red Hat Enterprise Linux ES release 4
Looking for a script that reads the following log files that gets generated everynight between 2 - 5am
Master_App_20090717.log
Master_App1_20090717.log
Master_App2_20090717.log
Master_App3_20090717.log... (2 Replies)
Discussion started by: aavam
2 Replies
5. Shell Programming and Scripting
Experts,
I am newbie in shell scripting. I want to write Bash shell scripts corresponding to windows bat files. I have installed cygwin at c:\cygwin and i am trying to crate the sh file using vi editor. i am not able to understand how to use linux/unix convention for the code. following is my... (1 Reply)
Discussion started by: rajuchacha007
1 Replies
6. Shell Programming and Scripting
I have a directory where i have *.sas; *.pl;*.sh and *.c scripts
I need to find out what are the child scripts and input output files for each script:
say I have a shell script which calls a perl script and a sas script:
In my first line I want
I a) the parent script name;
b) the... (1 Reply)
Discussion started by: ramky79
1 Replies
7. UNIX for Dummies Questions & Answers
Howdy Folks,
I have a list that looks like this:
(file2.txt)
AAA
BBB
CCC
DDD
and there are 24 of these short words.
I am matching these patterns to another file with 755795 lines (file1.txt).
I have this code for matching:
awk -v f2=file2.txt '
BEGIN {
while(... (2 Replies)
Discussion started by: heecha
2 Replies
8. Shell Programming and Scripting
Hi friends you can solve my question about make 3 shell scripts?
Thanks for all! (1 Reply)
Discussion started by: dakota
1 Replies
9. Shell Programming and Scripting
Dear All,
I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File.
The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files.
Any... (14 Replies)
Discussion started by: Rahul_Bhasin
14 Replies
10. Shell Programming and Scripting
I am trying to use awk to create (in this example) 3 seperate text file from the unique id in $1 in file, if it starts with the pattern aa. The contents of each row is used to populate each text file except for $1 which is not needed. It seems I am close but not quite get there. Thank you :).
... (3 Replies)
Discussion started by: cmccabe
3 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)