how to write a batch file in linux?and what are batch(.bat) file benefits?
I read lot of forums and others but I cant understand clearly.I want clear and short answer.
|
read about shell scripts instead. that's the appropriate linux talk.
|
you might want to say please / thank you next time.
you don't use ".bat" files under Linux, that's a DOS convention. the equivalent under Linux would usually be a bash script file, which you can learn to write from reading the bash scripting howto and using the editor of your choice. |
Quote:
"If you don't know why you need it, then you probably don't need it." Please tell us what problem you are trying to solve---e.g. do you need to write (or modify) a script on an existing system? |
|
Quote:
|
Thank You!
Thanks For all
|
Quote:
NO .bat in Gnu. In your mind are but windows without doors. |
Quote:
http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html http://www.tldp.org/LDP/Bash-Beginne...tml/index.html http://www.gnu.org/software/bash/man...ode/index.html http://www.grymoire.com/Unix/Sh.html http://tldp.org/LDP/abs/abs-guide.pdf http://www.tldp.org/LDP/abs/html/ http://mywiki.wooledge.org/BashFAQ http://mywiki.wooledge.org/BashPitfalls http://rute.2038bug.com/index.html.gz You don't write "batch files" in Linux. (for the sake of simplicity here), they are called shell scripts, or perhaps just scripts and have a usual .sh extension. .bat files cannot run in linux (except in Wine?) Linux shell scripts can be run in cygwin on Windows, but not as "batch files". They mostly do the same thing, process and accept supplied commands to the host's command interpreter. Both environments process their respective script.sh or file.bat one line at a time. Both Windows' batch files and Linux's shell scripts can be manipulated to behave in the desired manner, although the commands to achieve that 'desired manner' may differ from Linux to Windows and vice versa. Example. a Windows batch file that has "cls" to clear screen ...would be in a Linux shell script as "clear" It is my advice and belief that where you read is as important as what you read. Start with http://rute.2038bug.com/index.html.gz Have a Great Day! |
All times are GMT -5. The time now is 10:58 AM. |