I use the following awk command while waiting for a script to get a gateway for a specific destination
route | grep $dest | awk '{print $2}'
However, the expected script does not like $ 2 in the above statement.
Does anyone know of an alternative to awk to perform the same function as above? i.e. output 2nd column.
source
share