1012f69275fc356730af082ce6d1188707d85b877robbiew#!/bin/bash 2012f69275fc356730af082ce6d1188707d85b877robbiew################################################################################ 3012f69275fc356730af082ce6d1188707d85b877robbiew## ## 4012f69275fc356730af082ce6d1188707d85b877robbiew## Copyright (c) Dan Carpenter., 2004 ## 5012f69275fc356730af082ce6d1188707d85b877robbiew## ## 6012f69275fc356730af082ce6d1188707d85b877robbiew## This program is free software; you can redistribute it and#or modify ## 7012f69275fc356730af082ce6d1188707d85b877robbiew## it under the terms of the GNU General Public License as published by ## 8012f69275fc356730af082ce6d1188707d85b877robbiew## the Free Software Foundation; either version 2 of the License, or ## 9012f69275fc356730af082ce6d1188707d85b877robbiew## (at your option) any later version. ## 10012f69275fc356730af082ce6d1188707d85b877robbiew## ## 11012f69275fc356730af082ce6d1188707d85b877robbiew## This program is distributed in the hope that it will be useful, but ## 12012f69275fc356730af082ce6d1188707d85b877robbiew## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## 13012f69275fc356730af082ce6d1188707d85b877robbiew## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## 14012f69275fc356730af082ce6d1188707d85b877robbiew## for more details. ## 15012f69275fc356730af082ce6d1188707d85b877robbiew## ## 16012f69275fc356730af082ce6d1188707d85b877robbiew## You should have received a copy of the GNU General Public License ## 17012f69275fc356730af082ce6d1188707d85b877robbiew## along with this program; if not, write to the Free Software ## 184548c6cf9bcdd96d8303caa4130ab638b61f8a30Wanlong Gao## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## 19012f69275fc356730af082ce6d1188707d85b877robbiew## ## 20012f69275fc356730af082ce6d1188707d85b877robbiew################################################################################ 21012f69275fc356730af082ce6d1188707d85b877robbiew 22012f69275fc356730af082ce6d1188707d85b877robbiewDIR=$1 23012f69275fc356730af082ce6d1188707d85b877robbiewMAX=$2 24012f69275fc356730af082ce6d1188707d85b877robbiew 25012f69275fc356730af082ce6d1188707d85b877robbiewconcat(){ 26012f69275fc356730af082ce6d1188707d85b877robbiew cat $DIR/$file >> $DIR/$new_file 27012f69275fc356730af082ce6d1188707d85b877robbiew cat $DIR/$file/$file/$file >> $DIR/$new_file 28012f69275fc356730af082ce6d1188707d85b877robbiew 29012f69275fc356730af082ce6d1188707d85b877robbiew} 30012f69275fc356730af082ce6d1188707d85b877robbiew 317dfe471c49f41fae5e894c801c0b3a540aa0e340Hsin-Yi Chenwhile true ; do 32012f69275fc356730af082ce6d1188707d85b877robbiew file=$(($RANDOM%$MAX)) 33012f69275fc356730af082ce6d1188707d85b877robbiew new_file=$(($RANDOM%$MAX)) 34012f69275fc356730af082ce6d1188707d85b877robbiew concat 2> /dev/null 35012f69275fc356730af082ce6d1188707d85b877robbiewdone 36