help with the automatic execution of a linux command to form a batch file
GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
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.
help with the automatic execution of a linux command to form a batch file
hi, i am anwbie to programming and a fresh newbie to linux forum. I could log in to my router using putty to my router using plink of putty software. i just click it , and i culd log on to $ prompt.
What i want is i want to execute a "show status"inner command toget the important parameters of my router.
plink x.x.x.x user name password gets up to the $ prompt.
how to execute show status command to get the details i want.
going to cmd and issuing this command i could get the detaili want to add a bat file to execute and add to my task bar scheduler available in windows 7.
bin bash are terms that i could not use in my windows , i think.what is the continuation command at prompt $
please experts
Hi, thanks . those terms i hear for th first time.
i am not having linux system or ubantu.
i want to talk to the router to get instant particulars of status page of the router.
i just use putty and plink latest version to issue commands
but i want to have a kind of batch file to execute it automatically and to wait for user to close.
i am thinking of addding this to the task scheduler and to pop up, say for 3 hours internal period.
distro and version, you mean linux words.
i am having windows 7 ultimate and plan to have dual boot linux.
i do not know anyt anhing about linux operating system. i think that you can download windows 7 linux without any license.
i just noted some commands and making some settings change, i could log on to my pc to the router ip pgae. my putty version is 0.70
thanks for jet speed reply and i appreciate it very much sharing equals caring. thank you.
can i use window linux as windows 7
the example working bat lines
@ echo on
plink x.x.x.x -ladmin -pw xxxxxx
pause
this it goes to the $ pompt.
It's quite convenient for both beginners and advanced users.
As far as getting going from a legacy operating system, I have heard that there is a tool called Etcher which you can run to burn the image to a USB stick. Then you can test it in Live mode, where it runs from the USB stick and does not install. That will give you a good chance to test it out and decide which distro to try with the dual boot.
Hi, i want help in getting the result of continuing the show status .
Refering to linux books or blogs will take more time please\P S you have given the link of OS. thanks but what is compatible version to my windows 7 ultimate 32 bit. Is linux, developed by so many org , unlike windows
microsoft.
what is tessa\
please give me code help
While that command would work if connecting to a ssh server without knowing your router's make/model (Cisco?) or anything about its operating system it is a bit difficult to provide help.
hi, i KNOW that it is a internal command particular to the router model.
but , only want to know the code to execute like start or run
when i execute with comand prompt , i could get the result. Since i do not know, how to put codes in linux prompt, to be executed in windows .
here is how i access it thro cmd
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\System32>plink xxxxxxxx -l user -pw password
$show status
System
Alias Name : xxxxxxxx
Uptime : 0 3:50:26
Date/Time : Thu Jan 1 3:50:26 1970
Firmware Version : xxxxxx
LAN Configuration
IP Address : x.x.x.x
Subnet Mask : z.z.z.z
DHCP Server : Enable
MAC Address : xxxxxxxxxxxxxxx
WAN Configuration
Interface VPI/VCI Encap Droute Protocol IP Address Gateway Status
----------------------------------------------------------
pppoe1 x/xx LLC Off PPPoE xxxxxxxxxxxx xxxxxxxxxxx Up
$
now i have to type in cmd to get. i wnat it auto enabled command
Here is another way to send a command via plink. You can also try running the command from a text file. Otherwise what you want to accomplish might not be possible via plink.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.