[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bat dosyalar





c
es 200 wrote:
merhaba arkada�lar, windows da ki bat dosyalar� gibi bir dosya linux
da da yazabilir miyim? yazarsam uzant�s� ne olmal� ve nerede nas�l
�al��t�rmal�y�m.
  
Evet yazabilirsin, aşağıya bir örnek ekliyorum. bu benim otomatik update için hazırladığım çalıştırılabilir dosyam.

-----------------------------
#!/bin/bash

aptitude update && aptitude -y -d upgrade | mail -s "aptitude upgrade results" devrim.esenturk@gmail.com
aptitude update && aptitude -y -d dist-upgrade | mail -s "aptitude dist-upgrade results" devrim.esen
turk@gmail.com
--------------------------------

diyelim ki, yukarıdaki komut dosyasına "upgrade" adını verdim. ardından konsolda;

#chmod a+x dosyanın/yolu/upgrade

komutunu vererek dosyayı çalıştırılabilir hale getiriyorsunuz. Artık tek yapmanız gereken konsolda

#./upgrade

komutunu girmek.

Uzantı konusunda ise, genelde  .sh kullanılır, eğer dosya çalıştırılabilir şekildeyse uzantıya bile gerek yoktur.

Kolay gelsin

Devrim
-- 
Skype : devrimesenturk

To follow the path:                                                                                                               look to the master,                                                                                                                follow the master,                                                                                                                     walk with the master,                                                                                                                see through the master,                                                                                                  become the master

Reply to: