A getline.sh => getline.sh +22 -0
@@ 0,0 1,22 @@
+#!/bin/bash
+
+FILE="$1"
+LINE_NO=$2
+i=0
+touch new.txt
+
+grep -v '^[[:space:]]*$' $FILE > new.txt
+mv new.txt $FILE
+
+while read line; do
+ i=$(( i + 1 ))
+ case $i in $LINE_NO) echo "$line"; break;; esac
+done < $FILE
+
+
+
+
+
+
+
+
M logfile.txt => logfile.txt +0 -16
@@ 1,32 1,16 @@
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
-