Created
          June 1, 2011 18:34 
        
      - 
      
- 
        Save klaussilveira/1002961 to your computer and use it in GitHub Desktop. 
    Sorteio 4Linux
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/php | |
| <?php | |
| if (isset($argv[1])) { | |
| $lista = file($argv[1]); | |
| $total = count($lista) - 1; | |
| echo $lista[mt_rand(1, $total)]; | |
| } else { | |
| echo "Passe uma lista de nomes como parâmetro!"; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment