Differenze tra le versioni di "Ciclo for in bash"

Da Caos per caso.
Jump to navigation Jump to search
imported>Giorgio
imported>Giorgio
 
Riga 1: Riga 1:
  for i in `seq 20 100`; do ping -c 2 192.168.1.$i ; done
+
#!/bin/bash
 +
  for i in `seq 20 100`;  
 +
  do ping -c 2 192.168.1.$i ;  
 +
done
 +
 
 +
#!/bin/bash
 +
for i in $( ls ); do
 +
  echo item: $i
 +
done
  
 
[[Category:Linux]]
 
[[Category:Linux]]

Versione attuale delle 10:13, 13 lug 2016

#!/bin/bash
for i in `seq 20 100`; 
  do ping -c 2 192.168.1.$i ; 
done
#!/bin/bash
for i in $( ls ); do
  echo item: $i
done