I am trying to read a file using Linux Bash, and then use grep to run this line against the file itself. It doesn't seem to suit me ...
#!/bin/bash path=$1 while read line do var1=$(grep $line $path) echo $? exit done < $path
$? returns 1. What is going on here?
source share