View previous topic :: View next topic |
Author |
Message |
sometimes n00b

Joined: 25 Jun 2005 Posts: 52
|
Posted: Sat Mar 18, 2006 9:53 am Post subject: aiuto per piccolo script [RISOLTO] |
|
|
dovrebbe ritornare un linea casuale di un dato file...
qualche consiglio?
Last edited by sometimes on Sat Mar 18, 2006 11:15 am; edited 1 time in total |
|
Back to top |
|
 |
makoomba Bodhisattva


Joined: 03 Jun 2004 Posts: 1856
|
Posted: Sat Mar 18, 2006 10:30 am Post subject: |
|
|
Code: | n=`cat /etc/passwd| wc -l`; let r=($RANDOM%$n+1); head -n$r /etc/passwd | tail -n1 |
_________________ When all else fails, read the instructions. |
|
Back to top |
|
 |
sometimes n00b

Joined: 25 Jun 2005 Posts: 52
|
Posted: Sat Mar 18, 2006 11:14 am Post subject: |
|
|
grazie, eh! |
|
Back to top |
|
 |
makoomba Bodhisattva


Joined: 03 Jun 2004 Posts: 1856
|
Posted: Sat Mar 18, 2006 12:21 pm Post subject: |
|
|
 _________________ When all else fails, read the instructions. |
|
Back to top |
|
 |
|