Sponsored Content
Full Discussion: run script simultaneous
Top Forums Shell Programming and Scripting run script simultaneous Post 302478272 by robonet on Tuesday 7th of December 2010 01:21:54 PM
Old 12-07-2010
Tools run script simultaneous

I have 5 scripts, basicly do the same thing. Use expect and telnet to devices.

First set the variables and the script as follow
Code:
spawn telnet $ipaddr
expect "Username:"
send -- "$usuario\r"
expect "Password:"
send -- "$password\r"
send -- "\r"
send -- "\r"
send -- "copy running-config tftp:\r"
expect "[]?"
send -- "$tftpserver\r"
expect "]?"
send -- "$nameconfig.$gpo.[exec ps -ef | grep -w [pid] | head -1 |  awk {{print $3}}]\r"
expect "#"
send -- "exit\r"
expect eof

When I run the scripts 1 or 2, both run without problems.

Searching to reduce the time, I need run the 5 scripts simultaneously but when configure the /etc/crontab sometimes run 3, sometimes run 4, sometimes run 5.

Do you have a clue?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simultaneous printing

I am running AIX 4.3 and network printing setup with HP Jetdirect. I would like to be able to send the same printout to both of the network printers at the same time. They are both PCL data stream. I have tried to make this work by linking the two print que, by the results are unpredictable. Is... (1 Reply)
Discussion started by: sjk303
1 Replies

2. Shell Programming and Scripting

running simultaneous awks

Hello, I have an awk command that searches and replaces. I have multiple searches, but I do not want to do them one after the other. Is there a way in awk to run search/replace at the same time. thanks, (3 Replies)
Discussion started by: ctcuser
3 Replies

3. UNIX for Dummies Questions & Answers

simultaneous network start

Hi! I need to start a program at several hosts in the network at the same time. Starting time difference should be no more than several milliseconds. What is the best way to do that? Thanks! (5 Replies)
Discussion started by: harjar
5 Replies

4. UNIX for Dummies Questions & Answers

Problems with simultaneous access to a server

Hello, I'm working in a project where several procedures are programmed using UNIX scripts. One of these scripts is launched in several threads. When performing these threads an scp command to another server it gives out. This error happens only sometimes, others not and each time for a... (5 Replies)
Discussion started by: Hector_Saura
5 Replies

5. UNIX for Dummies Questions & Answers

Simultaneous file read operation

Hi All, I need information on file handling in UNIX enviornment. If in UNIX enviornment I have two process.. P1 P2 Both accessing the same file simultaneosuly(read operation).. Suppose P1 opened the file in read mode first and started reading the file.. Then P2 opens the same file in... (5 Replies)
Discussion started by: chibob
5 Replies

6. Shell Programming and Scripting

Cron job to prevent simultaneous script

I'm using a shared server on Hostgator (Linux CentOS). I'm trying to set a cron job using the Control Panel that will check if its already running before starting a new one. I've tried the following... * * * * * && but I get this error emailed to me... /bin/sh: line 0: Any... (5 Replies)
Discussion started by: tech9821
5 Replies

7. UNIX for Dummies Questions & Answers

Help with ls to input for simultaneous editing

I just registered today and started unix about a month ago. I'm trying to make a script where I can add commands or text to the end of files in a listing. $ echo "#text_or_command" >> #List of files from ls I can't seem to find/understand it on these fourms. Could it be done at... (4 Replies)
Discussion started by: 62583
4 Replies

8. Homework & Coursework Questions

Limit simultaneous file access

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: So my problem is: 4990 of 5000 users should be able to access a file. How can this be accomplished. 2.... (1 Reply)
Discussion started by: protiss
1 Replies

9. Shell Programming and Scripting

Simultaneous calling of url

Hello I want to call multiple sites simultaneously by xargs or parallel for example a.com/srv/1 a.com/srv/3 a.com/srv/2 a.com/srv/n That means 500 different sites will be called in a moment Then I use command I call a url at the same time. I need to call each url once, but every 500... (1 Reply)
Discussion started by: mnnn
1 Replies
qmail-start(8)						      System Manager's Manual						    qmail-start(8)

NAME
qmail-start - turn on mail delivery SYNOPSIS
qmail-start [ defaultdelivery [ logger arg ... ] ] DESCRIPTION
qmail-start invokes qmail-send, qmail-lspawn, qmail-rspawn, and qmail-clean, under the proper uids and gids. These four daemons cooperate to deliver messages from the queue. qmail-start arranges for qmail-send's activity record to be sent to qmail-start's output. See qmail-log(5) for the format of the activity record. Other than this, qmail-start does not print anything, even on failure. If defaultdelivery is supplied, qmail-start passes it to qmail-lspawn. If logger is supplied, qmail-start invokes logger with the given arguments, and feeds qmail-send's activity record through logger. Environment variables given to qmail-start will eventually be passed on to qmail-local, so make sure to clean up the environment if you run qmail-start manually: # env - PATH="/var/lib/qmail/bin:$PATH" qmail-start ./Mailbox splogger qmail & (all on one line) Resource limits, controlling ttys, et al. are also passed from qmail-start to qmail-local. Note that qmail-send normally juggles several simultaneous deliveries. To reduce qmail-send's impact on other programs, you can run qmail- start with a low priority. SEE ALSO
logger(1), splogger(1), nice(1), qmail-log(5), qmail-local(8), qmail-clean(8), qmail-lspawn(8), qmail-rspawn(8), qmail-send(8) qmail-start(8)
All times are GMT -4. The time now is 02:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy