Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Help how replace stardard keyboard inputs by arguments at run time of a script Post 302246612 by sivakumar.rj on Tuesday 14th of October 2008 03:46:04 AM
Old 10-14-2008
try this:assign the value of commands to a variable ie.

cmd1=$1
cmd2=$2
cmd3=$3
cmd4=$4
cmd5=$5

shift ${OPTIND}-1
if [[ $# -ne 5 ]]; then
echo "error in process"
exit 0
fi
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

use several inputs as arguments in my script

Hi there, It's pretty hard for me to explain my problem because I'm affraid I'm not using the correct vocabulary. So let me describe the situation. I wrote a script that has one argument. It works like this: ~$ cat /usr/local/bin/squote echo "$@" | sed 's/'\''/'\''\\'\'\''/g; s/.*/'\''&'\''/g'... (2 Replies)
Discussion started by: chebarbudo
2 Replies

2. Shell Programming and Scripting

need inputs on how i can change my script to reduce amount of time the script takes

HI , I have a list1 which consists of data that i have to search and a list2 which has the files that need to be searched .So basically i am using list1 on list2 to see if list1 data is present if found replace it .I have written the code using foreach loop for each list .This is taking the... (1 Reply)
Discussion started by: madhul2002
1 Replies

3. Shell Programming and Scripting

Run a script parallely with different arguments

Hi! I want to run a script in parallel with different arguments. eg. start script.sh argA script.sh argB script.sh argC end Can someone please tell how to achieve this. Thanks in advance. (4 Replies)
Discussion started by: dummyix
4 Replies

4. Shell Programming and Scripting

Run perl script with multiple file arguments

Hello everyone, I have two types of files in a directory: *.txt *.info I have a perl script that uses these two files as arguments, and produces a result file: perl myScript.pl abc.txt abc.xml How can I run this script (in a "for" loop , looping through both types of files)... (4 Replies)
Discussion started by: ad23
4 Replies

5. Programming

Some error with number of keyboard inputs occured with this code for reversing a string..

i used a two-way linked list "node" for the code:: #include<stdio.h> #include<malloc.h> void insert(); void reverse(); struct node { char c; struct node *next; struct node *back; }*start=NULL; int main() { int n,i; (4 Replies)
Discussion started by: mscoder
4 Replies

6. Shell Programming and Scripting

php file unable to run shell script with arguments

echo $result=exec("./permit.sh".$_FILES); pls suggest some other method to run shell script in php .:wall::mad: (0 Replies)
Discussion started by: upvan111
0 Replies

7. Shell Programming and Scripting

Passing multiple run time arguments

the scenario is - If I pass 3 three arguments( run time) , it should list all .txt files from a path to temp file if I pass 2 arguments ( run time) , it should list all .csv files from the same path to another temp file the above scenario should be handled in single code and also I dont know ... (2 Replies)
Discussion started by: Prashanth B
2 Replies

8. Shell Programming and Scripting

Automation of keyboard inputs..like Ctrl+d and Ctrl+a

Hi..! I'm stuck with my automation of starting a process and keeping it running even after the current ssh session has exited.. So i'm trying to use command 'screen'. which is doing exactly what i wanted, But the problem is automation of the same. i will have to press Ctrl+a and Ctrl+d for... (2 Replies)
Discussion started by: chandana hs
2 Replies

9. UNIX for Dummies Questions & Answers

How to send keyboard inputs toa UNIX command executed from a shell script?

I have a unix command that prompts for 'y'. How do I run this from my shell script? (4 Replies)
Discussion started by: Sree10
4 Replies

10. Windows & DOS: Issues & Discussions

Method to run a shell script using shortcut key in keyboard with out logging to putty

Dear All, I want to run a shell script with out logging to putty but configuring it to a keyboard short cut it windows PC. Can this be done? I want this to rename a log in a specified folder in a system Thanks (8 Replies)
Discussion started by: Chi_SL
8 Replies
timedsetup(8)						      System Manager's Manual						     timedsetup(8)

NAME
timedsetup - Performs initial setup of the time server daemon (timed). SYNOPSIS
/usr/sbin/timedsetup DESCRIPTION
The timedsetup command is an interactive script that can be used to perform initial time service configuration for your system. By default, timed does not start at boot time. The timedsetup script asks if you want the timed daemon to be started at boot time, and prompts you for any options to pass to the timed daemon whenever it is invoked. The script then starts the timed daemon. For more information on the timed options, see the timed(8) reference page. Note The timed daemon is provided for compatibility. Tru64 UNIX also provides support for the Network Time Protocol (NTP) through the xntpd daemon. Compaq recommends you use NTP for time synchronization. If your system is configured to run NTP, the timedsetup command passes the -E and -M options to the timed daemon by default. If you plan to run both the timed daemon and NTP, you should configure NTP first. RESTRICTIONS
In configurations with two or more hosts each connected to the same two or more subnetworks, only one of the host can run the timed with the -M option. FILES
Specifies the command pathname The timed startup and shutdown script Specifies timed parameters pertinent to a specific system SEE ALSO
Commands: timed(8), xntpd(8) timedsetup(8)
All times are GMT -4. The time now is 12:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy