Sponsored Content
Top Forums Shell Programming and Scripting shell script to run commands in different terminals Post 302686615 by mirni on Wednesday 15th of August 2012 02:50:40 AM
Old 08-15-2012
Why do you need a terminal for the processes to run them?
You could them in a new (sub)shell. But you could also just send the process into the background with a trailing ampersand:

Code:
./program1 -arg1 -arg2 > pr1.log &
./program2 &
etc

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run unix commands in a new shell inside a shell script?

Hi , I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell. So scenario is that - I need to have one shell script which is ran as a part of crontab - in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies

2. Shell Programming and Scripting

how can I write script that lets me run shell commands?

Hello I want to make simple extension to vi , you know how you want to run some shell command you do ":! ls -l " , then you go out the vi the command executed and then you hit enter and you back to vi but now I want to be able to go out of vi and run several command outside of vi .. and in... (3 Replies)
Discussion started by: umen
3 Replies

3. Shell Programming and Scripting

shell script to run a few commands help!

Hi friends this is first post i am very new to shell scripting so i require your expertise to do the following thank u I need to write a shell script which will run the following commands pg_dump bank > backup(Enter) Wait for bash prompt to appear coz it indicates that the command is... (23 Replies)
Discussion started by: perk_bud
23 Replies

4. Shell Programming and Scripting

Run shell commands via HTML webpage/button?

Hey guys, I got a issue here... we have a development box and a UAT box that our webmasters use, they do the webpage development on the development box and and save changed files to a particular directory on the dev machine. At a certain time of the day a cronjob kicks off and the... (3 Replies)
Discussion started by: zeekblack
3 Replies

5. Shell Programming and Scripting

Run a shell script from one host which connext to remote host and run the commands

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)
Discussion started by: SN2009
6 Replies

6. Shell Programming and Scripting

Help with shell script to run the commands reading options from local file

I have to use shell script to run series of commands on another unix box by connecting through SSH and giving user credentials. For running commands on remote machine I have to use options reading from a local file. Process: Connecting to remote unix server <host1.ibm.com> through ssh Login: ... (2 Replies)
Discussion started by: itsprout
2 Replies

7. Shell Programming and Scripting

Run multiple commands in $() without opening a new shell

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)
Discussion started by: akar_naveen
2 Replies

8. Shell Programming and Scripting

How 2 run same command across all open terminals

Hi folks. This has been bothering me for a while. Among the 8 virtual desktops I'm using, I have 18 terminals open right now. I change some of my user configuration (e.g. put a new alias into ~/.bashrc); but in order to use this new added alias, I have to source the config file: .... (4 Replies)
Discussion started by: mirni
4 Replies

9. Shell Programming and Scripting

[bash] run a shell who runs commands

Hi all. On X11 I'm on a shell ...shell_1 (/bin/bash). From here I want to open another shell window shell_2 who executes commands like "ls -l" or programs like ". /program"... so the "result" of commands shows in shell_2 window and not in shell_1. Is that possible ? (4 Replies)
Discussion started by: jerold
4 Replies

10. UNIX for Dummies Questions & Answers

Commands to run from shell script

Hi script> isumid 98765432 if i give above command in cmd prompt it is running the same thing if i give inside the shell script it is not working below is the code #!/bin/bash isumid 98765432 please give me a solution (16 Replies)
Discussion started by: Ramrangasamy
16 Replies
XCALL(9)						   BSD Kernel Developer's Manual						  XCALL(9)

NAME
xcall, xc_broadcast, xc_unicast, xc_wait -- cross-call interface SYNOPSIS
#include <sys/xcall.h> typedef void (*xcfunc_t)(void *, void *); uint64_t xc_broadcast(u_int flags, xcfunc_t func, void *arg1, void *arg2); uint64_t xc_unicast(u_int flags, xcfunc_t func, void *arg1, void *arg2, struct cpu_info *ci); void xc_wait(uint64_t where); DESCRIPTION
The machine-independent xcall interface allows any CPU in the system to request that an arbitrary function be executed on any other CPU. Sometimes it is necessary to modify hardware state that is tied directly to individual CPUs (such as a CPU's local timer), and these updates can not be done remotely by another CPU. The LWP requesting the update may be unable to guarantee that it will be running on the CPU where the update must occur, when the update occurs. Additionally, it is sometimes necessary to modify per-CPU software state from a remote CPU. Where these update operations are so rare or the access to the per-CPU data so frequent that the cost of using locking or atomic operations to provide coherency is prohibitive, another way must be found. Cross calls help to solve these types of problem. However, since this facility is heavyweight, it is expected that it will not be used often. xcall provides a mechanism for making ``low priority'' cross calls. The function to be executed runs on the remote CPU within a thread con- text, and not from a software interrupt, so it can ensure that it is not interrupting other code running on the CPU, and so has exclusive access to the CPU. Keep in mind that unless disabled, it may cause a kernel preemption. xcall also provides a mechanism for making ``high priority'' cross calls. The function to be executed runs on the remote CPU within a IPL_SOFTCLOCK software interrupt context, possibly interrupting other lower-priority code running on the CPU. NOTES
Functions being called should be relatively lightweight. They may block on locks, but carefully and minimally, to not interfere with other cross calls in the system. FUNCTIONS
xc_broadcast(flags, func, arg1, arg2) Call (*func)(arg1, arg2) on all CPUs in the system. Return a uint64_t ``ticket'' to xc_wait() on for the cross-call to complete. flags should be XC_HIGHPRI for a "high priority" call, and 0 for a "low priority" call. xc_broadcast() should not be called from interrupt context. xc_unicast(flags, func, arg1, arg2, ci) Like xc_broadcast(), but call (*func)() on only the CPU indicated by ci. xc_unicast() also returns a ``ticket''. xc_wait(where) Wait on the ``ticket'' returned by a prior xc_broadcast() or xc_unicast() for the corresponding cross-call to complete. xc_wait() should be called from a thread context. CODE REFERENCES
The xcall interface is implemented within the file sys/kern/subr_xcall.c. SEE ALSO
kpreempt(9), percpu(9) HISTORY
The xcall interface first appeared in NetBSD 5.0. AUTHORS
Andrew Doran <ad@NetBSD.org> BSD
October 24, 2011 BSD
All times are GMT -4. The time now is 12:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy