I'm having difficulty getting the awk command inside a bash script to work. The script follows:
#!/bin/bash
fpga-test -1 -a $1 > tmp.file && awk \'\/Read\/ {print \$2}\' tmp.file
When I run the command I get the following error.
# my_script 14
awk: cmd. line:1: Unexpected token
The intermediate file (tmp.file) looks like this, and I want only the second tokenized string.
Read 32769 or -32767 (0x8001) @ 0x0e
Suggestions?