Sponsored Content
Top Forums Shell Programming and Scripting How to automate user selection options in shell script? Post 302798641 by RudiC on Thursday 25th of April 2013 01:59:17 AM
Old 04-25-2013
Did you try a redirection?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Shell Script to Automate Package Installation

Hi, I have been asked to automate the package installation through shell script. I have 10 packages to be installed and in that 4 packages requires additional DB information(Host Name, Credentials etc) to be passed and for remaining 6 packages i need to provide the "Yes" - "No" . I have... (2 Replies)
Discussion started by: muhilan.r
2 Replies

2. UNIX for Advanced & Expert Users

Shell Script to Automate

I would like to automate script where i do not have to manually insert the username and password I wrote two different scripts but not able to achieve the results: here's to scripts i wrote #!/bin/bash cd /var/tmp /home/server/steve/pca --askauth -idx /opt/app/bin/expect <<EOF expect... (1 Reply)
Discussion started by: sam786
1 Replies

3. Shell Programming and Scripting

Automate shell script

I would like to automate script where i do not have to manually insert the username and password I wrote two different scripts but not able to achieve the results: here's to scripts i wrote #!/bin/bash cd /var/tmp /home/server/steve/pca --askauth -idx /opt/app/bin/expect <<EOF expect... (3 Replies)
Discussion started by: sam786
3 Replies

4. Shell Programming and Scripting

Automate CVS login using shell script

Hi, Can anyone pls help me to automate login to cvs. I basically want to login to cvs and update a file. the script always gets to the login and returns the prompt for a password. Is there any way to send the password in the script itself. Here is the script: #!/bin/ksh... (0 Replies)
Discussion started by: raghu_shekar
0 Replies

5. Shell Programming and Scripting

Automate emailing via shell script

Hi, I am struggling to send my email via shell script. I can type the command in and it works pefectly: mail -s "subject" email@email.co.email < text_to_sendHowever if I try and automate it it fails. I have tried setting variables for all aspects (mail, email addr, subject, message) with no... (3 Replies)
Discussion started by: mcclunyboy
3 Replies

6. Shell Programming and Scripting

How to automate SSH remote connection with a shell script

Hi Guys! I am trying to write a shell script for automated ssh. vairable user and passwd have initialized correctly, but when I use the following it still prompting me for the password. #!/usr/bin/bash user='root@10.14.76.225' passwd='admin' ssh $user $passwd uptime exit I... (3 Replies)
Discussion started by: pinpe
3 Replies

7. UNIX for Advanced & Expert Users

Can we Automate the User creation and setting password through a script in solaris 10

Hi, I am using Solaris 10 OS and Bash shell.Is there any way can we automate User creation and setting passwords through a script or any freeware tool. Advance thanks for your response. (1 Reply)
Discussion started by: muraliinfy04
1 Replies

8. Shell Programming and Scripting

A selection menu in a shell script

I'm writing a shell script and have a problem with selection when I issue the command, is there a way to automatically choose a selection number one after a selection menue appear Command 1-choice 2- choice 3-choice Thanks Sara (3 Replies)
Discussion started by: Sara_84
3 Replies

9. Shell Programming and Scripting

Automate the menu options using shell script

I have a menu option which will look as follows Select a menu option 1.change password 2.login as root user 3.show system version 4.quit Select> 1 please enter the new password: unix reenter the new password: unix press any key to enter (then displays again the menu options to enter the... (4 Replies)
Discussion started by: shivakumar6g
4 Replies

10. Shell Programming and Scripting

How to do user-preset login to Bash shell then automate path modification?

How do a user login with full user-environment preset to Bash shell then automatically do path modification with few script codes, either on command-line or put it in a script file. what i tried: bash --login -c PATH="/ANewPath:${PATH}" bash --login -c 'PATH="/ANewPath:${PATH}"; export PATH'... (2 Replies)
Discussion started by: abdulbadii
2 Replies
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)
All times are GMT -4. The time now is 09:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy