Commit 8b99904e authored by Russell D's avatar Russell D

Update coinsnap.sh

parent dcfea73c
......@@ -5,7 +5,7 @@
#date format
dr=$(date +%M)
dr3=$( expr "$dr" - 2 )
#run the crawler
......@@ -23,9 +23,21 @@ paste /tmp/CoinCol /tmp/PerCol /tmp/VolCol > /tmp/results.txt
#Display results
echo -en "Major Gainers \n"
cat /tmp/results.txt | head -30 | awk -F\" '{ printf "%-8s %-8s %s\n", $4, $8, $12 }' | grep \$[0-9].......
cat /tmp/results.txt | head -30 | awk -F\" '{ printf "%-8s %-8s %s\n", $4, $8, $12 }' | grep \$[0-9]....... | tee "/tmp/resultsform$dr"
echo -en "\n\n"
### compare old results
### format old files
cat "/tmp/resultsform$dr" | awk '{ print $1 }' | sort > /tmp/dr
cat "/tmp/resultsform$dr3" | awk '{ print $1 }' | sort > /tmp/dr3
#output
echo -en "Gainers for 3 minutes\n"
echo -en "Unique to 1 - Unique to 3 - in both"
comm /tmp/dr /tmp/dr3
#echo -en "Top 30 Gainers\n"
#cat /tmp/results.txt | head -30 | awk -F\" '{ printf "%-8s %-8s %s\n", $4, $8, $12 }'
......@@ -36,6 +48,8 @@ echo "saved in "results$dr""
rm -rf /tmp/CoinCol
rm -rf /tmp/PerCol
rm -rf /tmp/VolCol
mv /tmp/results.txt "/tmp/results$dr"
rm -rf /home/redcloud/cryptodl/CMC/top1/out.json
rm -rf /tmp/dr
rm -rf /tmp/dr3
mv /tmp/results.txt "/tmp/results$dr"
rm -rf /home/redcloud/cryptodl/CMC/top1/out.json
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment