|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Programming & Scripting A place to discuss website design, programming, shell scripts, etc |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
hi.
i need a start a lot of commands in console in many PC. for example ************** cd /usr/local/nagios cp bla bla rcapache2 restart bla bla ************* how i can make a 1 file as in MUSTDIE - *.bat? & run 1 file wich will be consist of all my commands? tnx for help |
|
|||
|
The simplest way to do it is put all your commands in a file. Then make it executable by using chmod, then you can execute the file as a script...
Example Code:
#!/bin/sh touch testfile cat > testfile echo test 1 ls echo test 2 ls -a echo test complete <ctrl>-z chmod +x testfile ./testfile |
|
|||
|
Quote:
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|