A compile_it.sh => compile_it.sh +24 -0
@@ 0,0 1,24 @@
+#!/bin/bash
+
+getmyline()
+{
+ FILE="$1"
+ LINE_NO=$2
+ i=0
+ while read line; do
+ i=$((i+1))
+ test $i = $LINE_NO && echo "$line";
+ done <"$FILE"
+}
+
+while read -r LINE
+do
+ if [ "$LINE" = "CTRL1" ]; then
+ echo -e "\nTHIS IS THE START OF A COMMAND\n"
+ #getmyline filelog.txt count
+ fi
+ if [ "$LINE" = "CTRL2" ]; then
+ echo -e "\nTHIS IS THE START OF A COMMAND\n"
+ #getmyline filelog.txt count
+ fi
+done < $1
A logfile.txt => logfile.txt +32 -0
@@ 0,0 1,32 @@
+Adafruit MPR121 Capacitive Touch sensor test
+
+MPR121 found!
+
+Adafruit MPR121 Capacitive Touch sensor test
+
+MPR121 found!
+
+ CTRL2
+
+ SEL4
+
+ SEL5
+
+ SEL6
+
+ SEL5
+
+ ENVIAR
+
+ CTRL2
+
+ SEL5
+
+ ENVIAR
+
+ CTRL2
+
+ D
+
+ ENVIAR
+