I need to write a more efficient way for the code below :
Just a simplified example:
cnt=50000
while [ cnt -ne 0 ]
do
echo "aaaa" >> file1
echo "bbbb" >> file2
((cnt=cnt-1))
done
The problem I have is that the files im creating are getting bigger and bigger and the time it takes to open them is obviously getting longer. The time it takes to complete this script is far too long. I need a better way to write to multiple files within a while loop.
Thanks in advance.
Alex
Just a simplified example:
cnt=50000
while [ cnt -ne 0 ]
do
echo "aaaa" >> file1
echo "bbbb" >> file2
((cnt=cnt-1))
done
The problem I have is that the files im creating are getting bigger and bigger and the time it takes to open them is obviously getting longer. The time it takes to complete this script is far too long. I need a better way to write to multiple files within a while loop.
Thanks in advance.
Alex