do_wget bugfix
No updates lately because the wget script was not behaving well. Since May 2005, 2347 mp3 filenames have accumulated in the shells folder. Most of these are empty files which are retained to prevent wget from grabbing new copies of previously downloaded files. This number of files was enough to cause an "Argument list too long" error when the script runs and tries to loop through the files. While recompiling the kernel is one suggested solution, I opted to replace my unweildy ls/awk combination with an elegant find.
Before:
After:
Besides being more concise and clear, and working, this also is better for not depending on the order of the columns returned by ls -l.
There's a backlog of 127 mp3 files to be audited, and hopefully something worth posting will be among them.
Before:
for files in `ls -clt $workingdir\shells/*mp3 |
awk '{if ($5 > 1) print substr($0, index($0, $9))}'`
After:
for files in `find $workingdir\shells/ -type f -name '*mp3' -size +1`
Besides being more concise and clear, and working, this also is better for not depending on the order of the columns returned by ls -l.
There's a backlog of 127 mp3 files to be audited, and hopefully something worth posting will be among them.