question to build a shell script

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting question to build a shell script
# 1  
Old 12-09-2007
question to build a shell script


I want to develope a script.
can you please give me solution to this script?

Several Processes Reporting Status back to a Master

Write two programs that communicate using message queues. One program (the
master) will receive messages periodically sent by multiple copies of the other
program (senders). The messages sent might simulate status or degree of
completion of a sender. Upon receipt, the master should print the message with
some identification of the sender. Prior to termination, each sender will send
a delimiter message. After receiving delimiter messages from all the senders,
the master will remove the message queue and exit.


assume the master's filename is msg_rpt_m

>From 14437: status mesg #1
>From 14438: status mesg #1
>From 14439: status mesg #1
>From 14437: status mesg #2
>From 14438: status mesg #2
>From 14439: status mesg #2
>From 14437: status mesg #3
>From 14438: status mesg #3
>From 14439: status mesg #3
>From 14437: status mesg #4
>From 14438: status mesg #4
>From 14439: status mesg #4
>From 14437: status mesg #5
>From 14438: status mesg #5
>From 14439: DONE
>From 14437: DONE
>From 14438: status mesg #6
>From 14438: DONE

# 2  
Old 12-09-2007
# 3  
Old 12-10-2007
nope it's not the same..
# 4  
Old 12-10-2007
Have you looked at the message queue API?

What functions are appropriate to the client and which to the server?

How are you going to build the client and server?

How are you going to test the solution?
# 5  
Old 12-12-2007
can you give psudocode if possible?

# 6  
Old 12-12-2007
Pls read the Rules of these forums - no homework allowed.
Thread closed!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script question

I am getting error files missing. can anyone tell me I can able to read the file. Can you tell what the other part does? xargs -i test -f {} cat $S.file | uniq | xargs -i test -f {} || error_func "files(s) missing!" (4 Replies)
Discussion started by: ramkumar15
4 Replies

2. Shell Programming and Scripting

Build.xml invocation by Build Script

Hi I have a build.xml file and I can run it on Windows via cmd. Now I want to write a script to invoke the same. Is there a way to do this? (1 Reply)
Discussion started by: ankur328
1 Replies

3. Shell Programming and Scripting

Shell script to build directory tree and files

Hi all, I'm trying at the moment to write a shell script to build a directory tree and create files within the built directories. I've scoured through sites and text books and I just can't figure out how to go about it. I would assume that I need to use loops of some sort, but I can't seem... (8 Replies)
Discussion started by: Libertad
8 Replies

4. Linux

Linux Shared Library build question...

I'm a bit new to Linux systems programming. I've been programming at the systems level for over 20 years on various other platforms, but I'm not as familiar with the GCC toolchain as I'd like to be (but I'm learning quickly)...;)... Our target is an ARM-based Linux Embedded system. We're using... (3 Replies)
Discussion started by: jcossette
3 Replies

5. Shell Programming and Scripting

Need to build Shell Script to search content of a text file into a folder consist several files

Have to read one file say sourcefile containing several words and having another folder containing several files. Now read the first word of Sourcefile & search it into the folder consisting sevral files, and create another file with result. We hhave to pick the filename of the file in which... (3 Replies)
Discussion started by: mukesh.baranwal
3 Replies

6. Shell Programming and Scripting

How to build a string in shell script

Hi all, I had a typical problem. I am using a parameter PK="PK1 PK2 PK3" i need to build the string a.PK1=b.PK1 and a.PK2=b.PK2 and a.PK3=b.PK3 Please help (8 Replies)
Discussion started by: nkosaraju
8 Replies

7. UNIX for Dummies Questions & Answers

Linux Shell Question: how to print the shell script name ?

Suppose I have a script named "" in the script how to print out its name ""? (3 Replies)
Discussion started by: meili100
3 Replies

8. Shell Programming and Scripting

Shell script question

Hello, i am doing a project for school and i cannot figure out whats wrong with my 2 programs they dont seem to work at all. the first program is called isprime and naturally it checks to see if hte number is prime or not here is my code: #!/usr/bin/bash num=$1 echo you typed if ... (2 Replies)
Discussion started by: jbou1087
2 Replies

9. Shell Programming and Scripting

A shell script question

Hi, I have a file say xmldir.conf. This is a flat file which contains the data in specific format not other then this. The format is /backup/surjya/mvfile,noeof /backup/surjya/mdbase,eof /backup/surjya/mdbaseso /backup/surjya/trial,hoeof /backup/surjya/test,eof The field before "," is... (2 Replies)
Discussion started by: surjyap
2 Replies

10. BSD

build kernel ,question?

# cd /usr/src/sys/i386/conf # cp GENERIC LOVEPP # cd /usr/src # make buildkernel KERNCONF=LOVEPP make:don't know how to make buildkernel. Stop Any suggestions? (I am using Freebsd4.8) (2 Replies)
Discussion started by: sheep
2 Replies
Login or Register to Ask a Question

Featured Tech Videos