Tuesday, March 20, 2012

One line for loop Linux command

Format : for i in {1..N} ; do  <command>;done;
Eg :
for i in {1..100} ;
do  sleep 2;echo `date`;done;

1 comment:

  1. make sure you run this in
    #!/bin/bash

    ReplyDelete