I How can I get the output from grep into a variable? In the following program I've tried the SSID line two ways but I am not getting what I want.
SSID=$(grep) ${FILE} -o empty-ssid
Gives me this
garrett@bedroom ~/Desktop/folder/project $ ./testScript.sh ../OLD-172.28.50.30-system.cfg
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
./testScript.sh: line 5: ../OLD-172.28.50.30-system.cfg: Permission denied
../OLD-172.28.50.30-system.cfg
SSID=$(grep ${FILE} -o empty-ssid)
Gives me this
garrett@bedroom ~/Desktop/folder/project $ ./testScript.sh ../OLD-172.28.50.30-system.cfg
grep: empty-ssid: No such file or directory
../OLD-172.28.50.30-system.cfg
Program
FILE=${1}
SSID=$(grep) ${FILE} -o empty-ssid
echo ${FILE}
echo ${SSID}
#END#