LinuxQuestions.org
Help answer threads with 0 replies.
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


Closed Thread
  Search this Thread
Old 03-28-2010, 10:58 PM   #1
visle
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Rep: Reputation: 0
edit help with .bat shell script


I'm wanting to create a basic script that allows a user to input a ping. and outputs the information just like command prompt ping 192.168.1.1 or whatever.. I found this script and was hoping it would get me on the right track.. can i edit this to allow the user to enter their own ping address..?

@ping x.x.x.x > nul
@IF ERRORLEVEL 1 GOTO dead
@IF ERRORLEVEL 0 GOTO alive

:dead
@net send x.x.x.x Dead
@ECHO Dead
@GOTO end

:alive
@net send x.x.x.x Alive
@ECHO Alive
@GOTO end

:end
@ECHO Goodbye
 
Old 03-28-2010, 11:10 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Duplicate---closed.
Please keep this all in the one thread (See my advice there)
 
  


Closed Thread



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
How can I use Shell script to edit a data at a particular location in a txt file? leena_d Programming 30 02-08-2010 12:43 AM
How to invoke a .bat file inside a shell script ???? nano2 Programming 2 07-30-2009 08:36 AM
Shell script to edit a file kaash_m31 Linux - Newbie 2 06-02-2008 05:43 AM
Remote Win Bat File execute Shell Script on AIX Server DriveMeCrazy AIX 5 05-26-2004 06:24 PM

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

All times are GMT -5. The time now is 08:55 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