I need some help with creating a script that I can run with Android Terminal Emulator.
Yesterday I bought my first tablet and rooted it. I downloaded the Android version of rtmpdump with KSV's patches (static version) and copied it to "/system/bin/" and gave it R/W and execute permissions. I'm using it with Chaturbate and it works fine, but I'd like to use a script to make it easier to use, but having some problems with it. I need to enter the modelname for the webpage (-p) and I need the modelname + date/time for the filename (-o), but this doesn't work. I can get the date/time, but the 'model' variable is always empty. I also tried to pass the modelname as an argument, but it doesn't recognize $1.
Code:
#!/system/bin/sh
now=$(date +"_%Y-%m-%d_%H-%M-%S").flv
echo "Enter model name: "
read model
echo "Saving stream as: $model$now"
rtmpdump -r "rtmp://...." -p "http://chaturbate.com/$model/" -o "/storage/UsbDriveA/$model$now"
This is the result (removed rtmpdump line).
Code:
u0_a160@android:/ $ su
u0_a160@android:/ # cd sdcard
u0_a160@android:/sdcard # sh cb.sh
: not found
: not found
Enter model name:
: not found
milfy
: not found
Saving stream as: _2014-01-31_22-03-14.flv
cb.sh[12]: u0_a160@android:/: not found
cb.sh[13]: u0_a160@android:/: not found
cb.sh[14]: u0_a160@android:/sdcard: not found
cb.sh[17]: Enter: not found
u0_a160@android:/sdcard #