scripts

My personal collection of scripts
git clone git://src.gearsix.net/scripts
Log | Files | Refs | Atom | README | LICENSE

touchn.sh (382B)


      1 # DEPRECIATED: found out you could just use "touch ./file{0..13}"
      2 
      3 #!/bin/sh
      4 # ~/scripts
      5 # description: create $2 files name $1 appended with 1 to $2
      6 # e.g$ touchn "song" 13      # creates song1...song13 in curr_dir
      7 
      8 # if no $2
      9 if [ -z $2 ]; then
     10     echo "ERROR! touchn: Specify number of files to touch in \$2";
     11     return 1;
     12 fi
     13 
     14 for i in $(seq 0 $2); do
     15     touchn "$1$i";
     16 done
     17