Sponsored Content
Top Forums Shell Programming and Scripting Interacting with two BASH shells Post 302342293 by Scott on Saturday 8th of August 2009 01:43:44 PM
Old 08-08-2009
Hi.

You could try something like this:

Code:
myWait
======
while [ "$(ps -ef | awk '$2 == '${1:-X})" ]; do sleep 3; done

Pass in the process ID to wait for (i.e. "myWait 5657" or "./myWait 5657")
 

10 More Discussions You Might Find Interesting

1. BSD

BSD, Bash and Shells?

When I use Mac OS X's Terminal the UI is some what easier than that of Linux... I this just a shell or something because using Bash is a pain in RH's Linux 9. It's so sensitive about case etc. ??? In that way what is the shell that OS X uses as it's default Bash is on OS X (OK Duh) and... (3 Replies)
Discussion started by: RedVenim
3 Replies

2. Answers to Frequently Asked Questions

Difference between ksh,bash and different shells.

Hello Everyone, Can someone please tell me the key difference between the different shells availabe i.e. ksh,bash,(i don't know the others ones. :confused: (5 Replies)
Discussion started by: a25khan
5 Replies

3. Shell Programming and Scripting

supply password to scp with out interacting

Hi, I am trying to supply password to scp with out having manual interaction. Like, store the password in a variable and it should be supplied to the scp when it prompted for the password. Is there any other way than the user authentication and using "expect" in perl script. i.e is this... (3 Replies)
Discussion started by: pc_raghu
3 Replies

4. Shell Programming and Scripting

Bash shells communication

Hello all, I have the following problem. In a Bash shell I run a program (I don't have the source code) which will execute some steps. At every step the program will wait for a user input. So I would like that another script which is running on a different shell will send these input togheter with... (4 Replies)
Discussion started by: alohisius
4 Replies

5. UNIX for Dummies Questions & Answers

Differences in BASH and ASH shells regarding if command?

Guys I now have a script that's working in a BASH environment, however one line doesn't appear to be working on an embedded device that has a busybox therefore ASH shell. I've googled but there's very little I can find regarding the ASH shell. In BASH the following line works... if ] ;... (6 Replies)
Discussion started by: Bashingaway
6 Replies

6. UNIX for Dummies Questions & Answers

Shells

Lets say my default shell is bash and then i load up csh and then ksh. How would i exit csh without exiting ksh? so basically i gone from bash > csh > ksh and i wish to close csh (2 Replies)
Discussion started by: Bill Thompson
2 Replies

7. Shell Programming and Scripting

Scrolling through text while interacting with program prompts

Hi all, I am trying write a shell script to automate the installation of a program, but during the process of the installation, the installation program requires the user to scroll through 10 pages of a license agreement. Since this is coming from stdout and is not a prompt, I am unable to send... (4 Replies)
Discussion started by: nanlee
4 Replies

8. Shell Programming and Scripting

Code for count the frequency of interacting pairs

Hi all, I am trying to analyze my data, and I will need your experience. I have some files with the below format: res1 = TYR res2 = ASN res1 = ASP res2 = SER res1 = TYR res2 = ASN res1 = THR res2 = LYS res1 = THR res2 = TYR etc (many lines) I am... (3 Replies)
Discussion started by: Tzole
3 Replies

9. UNIX for Dummies Questions & Answers

Please what are shells?

I mean like this: http://shells.red-pill.eu/ Can anyone explain how this works? I hope my post is not spam. I think its related to linux. Thank you (1 Reply)
Discussion started by: postcd
1 Replies

10. Shell Programming and Scripting

How to call exeute multiple bash shells from one master shell?

I have few bash shells, which i want to run sequentially, how to create a shell file, and execute/call one after other shell file. I am very new to shell programming. Bult some and running individually and also with crontab scheduler. never had a shell calling other shells, kindly would like... (2 Replies)
Discussion started by: cplusplus1
2 Replies
SUNLABEL(8)						    BSD System Manager's Manual 					       SUNLABEL(8)

NAME
sunlabel -- read or modify a SunOS disk label SYNOPSIS
sunlabel [-mnqs] device DESCRIPTION
sunlabel reads or modifies a SunOS disk label on device, which is used by the PROM on NetBSD/sparc hardware to find partitions to boot from. sunlabel only reads/writes the first 512 bytes of device. The supported options are: -m Ignore an incorrect magic number in the disk label. -n Synthesize a new label rather than reading what is there. -q Quiet mode - don't print unnecessary babble (currently this suppresses the ``sunlabel>'' prompt). -s Ignore checksum errors when reading the label. Note that -m is dangerous, especially when combined with -s, since it will then happily believe whatever garbage it may find in the label. When using these flags, all values should be checked carefully, both those printed by L and the partition table printed by P. sunlabel prints a prompt ``sunlabel>'' and expects commands. The following commands are understood: ? Show a short help message. [abcdefghijklmnop] <cylno> <size> Change partition (see below). L Print label, except for the partition table. P Print the partition table. Q Quit program (error if no write since last change). Q! Quit program (unconditionally) [EOF also quits]. S Set label in the kernel (orthogonal to W). V <name> <value> Change a non-partition label value. W Write (possibly modified) label out. The a through p commands will accept, for the <size> parameter, the nnn/nnn/nnn syntax used by SunOS 4.x format. (For those not familiar with this syntax, a/b/c means a cylinders + b tracks + c sectors. For example, if the disk has 16 tracks of 32 sectors, 3/4/5 means (3*16*32)+(4*32)+5=1669. This calculation always uses the nsect and ntrack values as printed by the L command; in particular, if they are zero (which they will initially be if -n is used), this syntax is not very useful. Some additional strings are accepted. For the <cylno> parameter, ``end-X'' (where X is a partition letter) indicates that the partition should start with the first free cylinder after partition X; ``start-X'' indicates that the partition should start at the same place as partition X. For the <size> parameter, ``end-X'' indicates that the partition should end at the same place as partition X (even if partition X ends partway through a cylinder); ``start-X'' indicates that the partition should end with the last cylinder before partition X; and ``size-X'' means that the partition's size should exactly match partition X's size. Note that sunlabel supports 16 partitions. SunOS supports only 8. Labels written by sunlabel, when partitions i through p are all set offset=0 size=0, are identical to Sun labels. If any of the ``extended'' partitions are nontrivial, information about them is tucked into some otherwise unused space in the Sun label format. The V command changes fields printed by the L command. For example, if the L command prints ascii: ST15230N cyl 5657 alt 2 hd 19 sec 78 rpm: 0 pcyl: 0 apc: 0 obs1: 0 obs2: 0 intrlv: 1 ncyl: 5657 acyl: 0 nhead: 19 nsect: 78 obs3: 0 obs4: 0 then V ncyl 6204 would set the ncyl value to 6204, or V ascii Seagate ST15230N cyl 5657 hd 19 sec varying would set the ascii-label string to that string. sunlabel performs very few consistency checks on the values you supply, and the ones it does perform never generate errors, only warnings. AUTHORS
der Mouse <mouse@rodents.montreal.qc.ca> BUGS
It may be that the space in the label where the information for the extended partitions is saved is used by SunOS. Not very many consistency checks are done on the V arguments, and those only produce warnings. NetBSD doesn't support 16 partitions in a Sun disk label yet. BSD
December 21, 2002 BSD
All times are GMT -4. The time now is 06:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy