In windows, we use BAT file to execute few series of command , which help us
in not writing each command manually everytime we want to execute those
commands.
In CentOS, I want to do the same thing.
Can anyone help me with this :
I want to write below comands in a bat file and run the bat file so that it runs all commands automatically ?
wget http://asterisk.hosting.lv/bin12/codec_g723-ast12-gcc4-glibc-pentium4.so
cp codec_g723-ast12-gcc4-glibc-pentium4.so /usr/lib/asterisk/modules/codec_g723.so
chmod +x /usr/lib/asterisk/modules/codec_g723.so
wget http://asterisk.hosting.lv/bin12/codec_g729-ast12-gcc4-glibc-pentium4.so
cp codec_g729-ast12-gcc4-glibc-pentium4.so /usr/lib/asterisk/modules/codec_g729.so
chmod +x /usr/lib/asterisk/modules/codec_g729.so
Any Help ?
bat file: NewBie Question
- WhatsHisName
- Posts: 1549
- Joined: 2005/12/19 20:21:43
- Location: /earth/usa/nj
Re: bat file: NewBie Question
Not a CentOS question.
But consider googling "writing bash scripts".
But consider googling "writing bash scripts".
Re: bat file: NewBie Question
- create a new text file (use any text editor - gedit, nedit, kate, vim, ...)
- put this line at the top (no spaces at the beginning):
#!/usr/bin/env bash
- put your commands after that
- save the file and make it executable (command: chmod +x )
Here is some excellent reading for you: http://tldp.org/LDP/abs/html/
- put this line at the top (no spaces at the beginning):
#!/usr/bin/env bash
- put your commands after that
- save the file and make it executable (command: chmod +x )
Here is some excellent reading for you: http://tldp.org/LDP/abs/html/