You can run comands in the background using the & symbol. The wait command waits for these processes to finish..
In this example "wait" waits for cmd's 1 and 2 to finish and it is invoked when the foreground process cmd3 finishes. After cmd1 and cmd2 will have finished cmd4 gets run.
Last edited by Scrutinizer; 03-20-2012 at 09:13 AM..
I need a command, which could run mutliple commands from a file.
Let's say, I have
mv fileA1 fileB1
mv fileA2 fileB2
.....
mv fileA20 fileB20
I put these commands in a file, then I need a command to run the file as a whole so that I don't need to type 20 times...
Anyone tell me how to... (8 Replies)
I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
The code below works, but takes too many lines and looks awkward:
db2 "export to $filename of del select * from $table with ur"|tee -a $LOGFILE|awk '/Number of rows exported:/ {print $5}' > numrows.tmp
numrows=$(cat numrows.tmp)
rm numrows.tmp
When I try the... (2 Replies)
Hi SSHers,
I have embedded this below code in my shell script..
/usr/bin/ssh -t $USER@$SERVER1 /usr/bin/ssh $USER2@S$SERVER2 echo uptime:`/opt/OV/bin/snmpget -r 0 -t 60 $nodeName system.3.0 | cut -d: -f3-5`
SSH to both these servers are public-key authenticated, so things run... (13 Replies)
I can't get this to work. Running a single command works fine:
find . -name "*.dat" -exec wc -l '{}' \;
gives me the file name and number of lines in each .dat file in the directory.
But what if I want to pipe commands, e.g. to grep something and get the number of lines with that pattern... (3 Replies)
Hi,
I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them.
Each of... (20 Replies)
I am using SUSE Linux Enterprise Server 10 SP2 (i586) and I had earlier ammended my sudoers file to allow users to become root user with "sudo su - " command
Now I am trying to add multiple users to the sudoers file to run several commands such as restarting the server, restarting the nagios... (9 Replies)
Hi,
I have coded a program in Haskell using the compiler Hugs and the program requires multiple commands (with parameters) to be entered into it, it then outputs the result of its execution. I need to test a lot of different options (i.e. the parameters) so it would be obvious to automate the... (0 Replies)
Hi All,
I have the below requirement.
I want to copy the local file to remote after that i need to run the local script on a remote machine.When i use two ssh commnds i can achieve this. But i want to achieve this using one ssh command.
Below command to copy the local file to remote
ssh -q... (2 Replies)
Hello,
I'm attempting to open multiple xterms and run a command as an SAP user via sudo using PSSH. So far, I'm able to run PSSH to a file of servers with no check for keys, open every xterm in to the servers in the file list, and SUDO to the SAP(ADM) user, but it won't do anything else... (11 Replies)
Discussion started by: icemanj
11 Replies
LEARN ABOUT OSX
tkwait
tkwait(n) Tk Built-In Commands tkwait(n)
__________________________________________________________________________________________________________________________________________________NAME
tkwait - Wait for variable to change or window to be destroyed
SYNOPSIS
tkwait variable name
tkwait visibility name
tkwait window name
_________________________________________________________________DESCRIPTION
The tkwait command waits for one of several things to happen, then it returns without taking any other actions. The return value is always
an empty string. If the first argument is variable (or any abbreviation of it) then the second argument is the name of a global variable
and the command waits for that variable to be modified. If the first argument is visibility (or any abbreviation of it) then the second
argument is the name of a window and the tkwait command waits for a change in its visibility state (as indicated by the arrival of a Visi-
bilityNotify event). This form is typically used to wait for a newly-created window to appear on the screen before taking some action. If
the first argument is window (or any abbreviation of it) then the second argument is the name of a window and the tkwait command waits for
that window to be destroyed. This form is typically used to wait for a user to finish interacting with a dialog box before using the
result of that interaction.
While the tkwait command is waiting it processes events in the normal fashion, so the application will continue to respond to user interac-
tions. If an event handler invokes tkwait again, the nested call to tkwait must complete before the outer call can complete.
KEYWORDS
variable, visibility, wait, window
Tk tkwait(n)