This is a very very basic program to organize dumps. If you are bulk seller of dumps, this program can serve you very well. Now you can sell individual bins as well.
Note: The only drawback of the program is that it doesn't delete the track2 it has found from the original source so when another client requests same bin, there might be duplicate. If someone wants to add to script such function, please pm in thread.
~KNS
Note: The only drawback of the program is that it doesn't delete the track2 it has found from the original source so when another client requests same bin, there might be duplicate. If someone wants to add to script such function, please pm in thread.
Code:
#!/bin/bash
echo "==============================="
echo "| Dumps Search Script v0.1 |"
echo "| Community Edition |"
echo "| by KNS |"
echo "==============================="
bin=""
x="1"
quan=""
while [[ ! $bin =~ ^[0-9]{6}$ ]]; do
echo -e "\n1. Please enter the 6-digit bin:"
read bin
done
while [[ ! $quan =~ ^[0-9]+$ ]]; do
echo -e "\n2. Enter quantity of dumps (how much):"
read quan
done
echo -e "\n3. Enter file name:"
read file
grep -hir "$bin.*" . | sort -u > temp.kns
sed -n "$x,${quan}p;${quan}q;" "temp.kns" > $file
rm -rf temp.kns
echo -e "\nDone! $quan dumps logged into $file"