15 lines
481 B
Bash
15 lines
481 B
Bash
#!/bin/bash
|
|
rm dataset-1.txt
|
|
cat dataset-0.txt | while read oneline;
|
|
do
|
|
uuid=`echo $oneline | awk '{print $1}'`
|
|
datapath=`echo "$oneline" | awk -F'\t' '{print $4}'`
|
|
fcount=`find -L "$datapath"/* | wc -l`
|
|
if [ $fcount -gt 0 ]; then
|
|
volume=`du -sbL "$datapath"/* | awk '{a+=$1}END{print a}'`
|
|
echo -e $uuid'\t'$volume'\t'$fcount'\t'$datapath >> dataset-1.txt
|
|
else
|
|
echo $datapath;
|
|
fi
|
|
done
|
|
exit 0 |