Skip to content

Instantly share code, notes, and snippets.

@arpitjindal97
Created September 25, 2017 18:12
Show Gist options
  • Save arpitjindal97/201e4b897d69c7dce5f3994f5eb597a2 to your computer and use it in GitHub Desktop.
Save arpitjindal97/201e4b897d69c7dce5f3994f5eb597a2 to your computer and use it in GitHub Desktop.
str=""
get_ran()
{
str="35234708"
for i in `seq 1 7`
do
str=$str`expr $RANDOM % 10`
done
}
get_ran
str=send\ at+egmr=1,7,\\\"$str\\\"
echo $str > input.txt
get_ran
str=send\ at+egmr=1,10,\\\"$str\\\"
echo $str >> input.txt
echo "send at" >> input.txt
echo arpit1997 | sudo -S minicom -S input.txt -D /dev/ttyACM0
echo arpit1997 | sudo -S minicom -S input.txt -D /dev/ttyUSB0
rm input.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment