Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
hi guys , i am trying to create script with curl command:
curl -v "http://x.x.x.x......"
sleep 5
about 300 of this commands, it will help me to remotely log off and login cisco phones. How can I run that text file/script?
Is it just : file [file location] ?
should i make it exe ? please share steps
thank you
Yes you should put your commands into a file and make that file executable. You can run that file, providing you are in the directory where it is located, or if it resides in a directory which is in your $PATH variable.
There is also some syntax relevant to bash scripts which you need to be aware of.
A first script example is shown in Section 1.5.5: An example Bash script: mysystem.sh and this should show you a great example in line with what you're doing here and help you with the syntax I'm referring to.
Thank you guys. Is there a way to get logs, output results ?
Hi,
Back to the reference Appendix A: Shell Features where you'll find the input/output redirectors. There are examples throughout that document if you search for redirect. It is a matter of choosing between ">" for redirect to file (new), or ">>" redirect to file (append)
Y You can run that file, providing you are in the directory where it is located,
Unlike MS-DOS the current directory is not in the path in Linux. You can put . in the path, but it isn't by default. A Unix instructor told me it was a bad idea. I can't recall the reason; I'll try to.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.