Hocam ayni seyleri farkli acilardan soyluyoruz. Ozetle ben sistemi bilen
biri php,ruby,phyton, perl ne ogrenirse ogrensin isini gorecektir demek
istemistim. 
phyton bilmedigimden dolayi da kendisini oneremiyorum ama perl daha
onceki yazdigim ve sizinde bildiginiz nedenlerden dolayi tercih
edilebilir diyorum. 

On Mon, 2012-04-30 at 14:20 +0300, Serdar KÖYLÜ wrote:
> Bir '$' ve ';' zaten yeterince kafa karıştırıcı. Ama bu gibi
> örneklerde olayı anlamak daha zor. 
> 
> (a == b) ile ( a === b) arasındaki fark mesela. PHP'nin okunurluğunu
> azaltan bir şey. Bu bir uygulama yazaan için mevzu değil, fakat sistem
> yönetici için fazla karışık bir bilgi. 
> 
> Benzer şekilde, x++, ++x gibi hususlarda. Evet, bunlar güzellik ama,
> kafa karıştıran şeyler. Sistem yönetici seviyesi için bu okunurluğu
> ciddi şekilde azaltır. 
> 
> Bunlardan PHP'nin kötü, Python'unda basit ve güçsüz olduğu anlamı
> çıkmaz elbette. Python'da da benzer tripler çok kafa karıştırıcı
> olabilir:
> 
> result += "\t" + " ".join(*[str(p) for p in linePoints if p is not None]) + 
> "\n"
> 
> 
> 
> Python, daha az triple, daha sade yazımla kullanılabilir. Ama asıl
> gücünü, sistem seviyesi işlevlerde çok daha iyi destek ve hazır kod
> bulabilmesi ile gösterir. Zaten PHP biliyorsanız, bu sizi sistem
> scripti yazmaktan geri bırakmaz haliyle, süper de yazarsınız. 
> 
> Ama bence bu işlerin ilacı bash'tır. En iyi neticeyi o verir aslında
> bu işler için. 
> 
> 
> 2012/4/30 Atıf CEYLAN <[email protected]>
> 
>         On Mon, 2012-04-30 at 13:53 +0300, Mucibirahman İLBUĞA wrote:
>         
>         
>         > #!/usr/bin/python
>         > # -*- coding: utf8 -*-
>         > import string, os, time, random
>         > 
>         > 
>         > sifre=str(random.random())
>         > 
>         > 
>         > sifre=sifre[-5:]
>         > 
>         > f=open('/root/sifre','w')
>         > 
>         > f.writelines(sifre+chr(10))
>         > 
>         > f.close()
>         > 
>         > 
>         > cmd='htpasswd -bc /var/.htpasswd FtpKullanici `cat /root/sifre`'
>         > os.system(cmd)
>         > 
>         > cmd='mail -s "Mevcut ftp sifresi..." [email protected] < /root/sifre'
>         > os.system(cmd)
>         > 
>         > cmd='mail -s "Mevcut ftp sifresi..." [email protected] < 
> /root/sifre'
>         > os.system(cmd)
>         > 
>         > 
>         > 
>         
>         Test etmedim ama ayni isi yapan php kodu da asagidadir,
>         
>         #!/usr/bin/php
>         
>         $sifre=rand(10000,99999);
>         $f=fopen('/root/sifre','w');
>         
>         fwrite($f,$sifre+chr(10));
>         fclose($f);
>         
>         $cmd='htpasswd -bc /var/.htpasswd FtpKullanici
>         `cat /root/sifre`';
>         system($cmd);
>         
>         $cmd='mail -s "Mevcut ftp sifresi..." [email protected]
>         < /root/sifre';
>         system($cmd);
>         
>         $cmd='mail -s "Mevcut ftp sifresi..." [email protected]
>         < /root/sifre';
>         system($cmd);
>         
>         :) noktali virgul ve $ eklemek disinda pek fark olmadi
>         goruldugu gibi.
>         
>         
>         -- 
>         
>         /**
>          * @author Atıf CEYLAN
>          * Software Developer & System Admin
>          * http://www.atifceylan.com
>          */
>         
>         
>         _______________________________________________
>         Linux-programlama mailing list
>         [email protected]
>         https://liste.linux.org.tr/mailman/listinfo/linux-programlama
>         Liste kurallari: http://liste.linux.org.tr/kurallar.php
>         
> 
> 
> 
> 
> _______________________________________________
> Linux-programlama mailing list
> [email protected]
> https://liste.linux.org.tr/mailman/listinfo/linux-programlama
> Liste kurallari: http://liste.linux.org.tr/kurallar.php


-- 

/**
 * @author Atıf CEYLAN
 * Software Developer & System Admin
 * http://www.atifceylan.com
 */
_______________________________________________
Linux-programlama mailing list
[email protected]
https://liste.linux.org.tr/mailman/listinfo/linux-programlama
Liste kurallari: http://liste.linux.org.tr/kurallar.php

Cevap