Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need help with script
I have 5 networks and I need ping script with menu option.
example:
1) network 1 (10.0.0.1) network 1 is only alias
2) network 2
etc.
choose option:
Then choose option
Enter number of ping:
then enter of ping show
ping network% n%
this looks a little bit like a homework question. Please note that although we are happy to help, we won't do your homework for you. Show us what you have tried and tell us where you are having trouble, then we can help point you in the right direction.
If this is not a homework question, why do you want and interactive menu driven program for this? Is there something wrong with using ping directly on the commandline?
It isn't homework.
I need this script to our Technical Service. In windows I use this bat.file
And I don't know shell commands Can you help me?
Yes, we can help you, but you do need to show some effort of your own. There are MANY easily found bash scripting tutorials you can find, and the shell command to ping is (obviously enough), called "ping". Also, there are many already written scripts to do exactly what you're after, and Google can show them to you, like this one: http://www.thelinuxtips.com/2012/06/...ultiple-hosts/
Yes, we can help you, but you do need to show some effort of your own. There are MANY easily found bash scripting tutorials you can find, and the shell command to ping is (obviously enough), called "ping". Also, there are many already written scripts to do exactly what you're after, and Google can show them to you, like this one: http://www.thelinuxtips.com/2012/06/...ultiple-hosts/
I understand you,
ad1) but I don't want multiple host in txt file. I need choose some subnet and choose last oktet IP host and number of pings
ad2) It doesn't solve the menu, where I choose subnet and last oktet from host IP
So and only convert my .bat file to bash script
In my bat file is easy to view what I want
so where is the problem?
You think I'm on the net looking for a solution? I do not need to learn the lengthy script. The only thing I need to convert my bat file to a shell script, or on the basis of my bat file to create a shell script.
LQ is about spreading knowledge. If you are not interested in learning and just want someone to simply provide a ready made solution, you're not likely to find much help here. That sort of help usually comes in the form of paid contractors/consultants.
I understand you,
ad1) but I don't want multiple host in txt file. I need choose some subnet and choose last oktet IP host and number of pings
ad2) It doesn't solve the menu, where I choose subnet and last oktet from host IP
So and only convert my .bat file to bash script
In my bat file is easy to view what I want so where is the problem?
You think I'm on the net looking for a solution? I do not need to learn the lengthy script. The only thing I need to convert my bat file to a shell script, or on the basis of my bat file to create a shell script.
Try to understand me
We do understand you: you want someone to write a script for you, and you don't want to be bothered learning anything. Thanks, but no. If you don't want to put any effort into doing work that you're getting PAID to do, why should we do your work for you, FOR FREE???.
You've been pointed to resources to help you solve your problem, and have folks willing to HELP you...this means putting some effort in of your OWN, rather than being lazy and somewhat rude, and expecting others to do your work for you. Again, show some effort, post what you've written/tried, and we will be happy to help.
ad 1) This work is not paid, it is a personal initiative
ad 2) The fact that I can not write script in Linux is only one.
I can not learn scripting, in this time.
I just need advice or or rewrite my bat file into a shell script
ad 1) This work is not paid, it is a personal initiative
ad 2) The fact that I can not write script in Linux is only one. I can not learn scripting, in this time.
I just need advice or or rewrite my bat file into a shell script
Thats all.
It's been about a month since you first posted...MORE than enough time for you to have looked at the sample script you were provided, and look at one of the THOUSANDS of bash-scripting tutorials, and made it work. Since it's your 'personal initiative', you should be WANTING to learn, rather than asking someone to do it for you.
You WERE given advice, a sample script, and there are even links on LQ (and in my posting signature), to bash scripting tutorials. You've not done any of it, and AGAIN, we are not going to write your script FOR YOU. You will NEVER be able to write a script if you don't actually TRY TO DO IT.
Either look at the sample and scripting tutorials and put some effort into it (which WILL get you lots of help), or get someone else to write your script for you.
ad 1) This work is not paid, it is a personal initiative
ad 2) The fact that I can not write script in Linux is only one.
I can not learn scripting, in this time.
I just need advice or or rewrite my bat file into a shell script
You can always hire someone to do something like this for you. You are unlikely to find someone that is going to take the time to do it for you for free.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.