LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-28-2005, 12:02 PM   #1
mdaddyrabbit
LQ Newbie
 
Registered: Feb 2005
Location: north carolina
Distribution: N/A
Posts: 6

Rep: Reputation: 0
I need a script


I need a script for school and I have tryed to get one to work but with no luck. I need one that will execute 10 VNC's and then terminate the exection after opening them all. Please help me.
 
Old 11-28-2005, 12:13 PM   #2
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
From the site rules
  • Do not expect LQ members to do your homework - you will learn much more by doing it yourself.
Maybe show us what you've tried to do and we could help
 
Old 11-28-2005, 12:55 PM   #3
mdaddyrabbit
LQ Newbie
 
Registered: Feb 2005
Location: north carolina
Distribution: N/A
Posts: 6

Original Poster
Rep: Reputation: 0
Bite me

Foudlsy, I will go back and read the the rules, which I should have done in the beginning,

Last edited by mdaddyrabbit; 11-28-2005 at 05:21 PM.
 
Old 11-28-2005, 01:08 PM   #4
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
I was actually trying to encourage you to show us the code you have already so that you appear to ve showing willing. Don't think many people would do your homework for you, especially with an attitude like you've just shown. Obviously my attempt to keep things light-hearted and in good faith didn't go too well. That's a shame, as what you're after is fairly easy and am sure a few people could have helped you out, including myself.

Hope you get things and find what you're looking for.
 
Old 11-28-2005, 02:25 PM   #5
mdaddyrabbit
LQ Newbie
 
Registered: Feb 2005
Location: north carolina
Distribution: N/A
Posts: 6

Original Poster
Rep: Reputation: 0
Not that it matters

I got this sprung on me with no time to work on it, I did the best i could with it and like I said it didn't work. I throwed what code I had a way to try and start over so I have no idea what it was or why it didnt work.

I have to have this by tonight, so i had google it and not found anything that helped me, I knew I was running out of time and being in such a tight I ask for assistance.

I have never used Linux in any shape or form so I am totally lost with it and scripting, I just felt affended when I am told no one would do my home work for me.

If I knew how to do it I would be more than glad to write the script for you or anyone else that needed a helping hand, I dont have the time to learn it at present I just need to get past this assignment so to freeup a little time that I may have a opportunity to discover the world of Linux.
 
Old 11-28-2005, 02:54 PM   #6
genderbender
Member
 
Registered: Jan 2005
Location: US
Distribution: Centos, Ubuntu, Solaris, Redhat
Posts: 396

Rep: Reputation: 31
I think you need some psuedo code and a suitable psuedo compiler... Theres plenty around and they tend to work on all systems.
 
Old 11-28-2005, 03:05 PM   #7
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
Code:
#!/bin/bash

# Fire up ten instances of VNC
# Well, it's xvncviewer - change to whatever client
# you are wishing to run

# Set your counter
count=0

# Create a loop to run through 10 times
while [ $count -ne 10 ]
do
	# Execute your command and background
	xvncviewer &

	# Increment your counter
	count=$(( $count  + 1 ))
done

# Get the PID's of your running processes
pidof xvncviewer > vncpids

# Now read your PID's back in
exec < vncpids

# Now kill each process
read line
	kill -9 $line
That fires up 10 xvncviewers, then kills them once all 10 are open. Play with it to suit your needs. If you need anything else, tinker with it or ask politely.

Now, if I could only get some halogen bulbs for my flashlight to help read my map better...
 
Old 11-28-2005, 03:14 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Re: Bite me

Quote:
Originally posted by mdaddyrabbit
Foudlsy, I will go back and read the the rules, which I should have done in the beginning, but for the most part you can bite me.
And here's the same comment from a mod; and I ask you
to edit your post and remove the foul language and personal
attack.


Tink
 
Old 11-28-2005, 03:49 PM   #9
esteeven
Senior Member
 
Registered: Oct 2001
Location: Bristol UK
Distribution: Arch Slackware Ubuntu
Posts: 1,082

Rep: Reputation: 52
Well said!! I looked at this thread because I thought I might be able to help in some way. I didn't expect another poster (who said what I would have said) to be berated for helping. mdaddyrabbit - appreciate help when it is offered. You might not get it again.
 
Old 11-28-2005, 05:25 PM   #10
mdaddyrabbit
LQ Newbie
 
Registered: Feb 2005
Location: north carolina
Distribution: N/A
Posts: 6

Original Poster
Rep: Reputation: 0
To everyone

Sorry for the loss of temperment, under alot of stress, which is nobodys problem but mine. I am truly sorry for my actions within this forum. I appreciate the help I have gotton here. Fouldsy I truley appreciate your help. I wish everyone well.
 
Old 11-29-2005, 04:36 AM   #11
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
There's not really anything you could say that would bother me, I usually just ignore threads and members with such outbursts, but at least you realised your mistake. I hope the script was helpful in some way and that you find time during all your studies to appreciate Linux + maybe pick up a bit of coding yourself!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM
creating shell script that executes as root regardless of who runs the script? m3kgt Linux - General 13 06-04-2004 10:23 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration