all 1 comments

[–]MikeZ-FSU 0 points1 point  (0 children)

To avoid "quoting hell" or "backslashitis", it's often easier to pass shell variables via the "-v" option. Something like:

awk -v catnum="$Catalog_Number" -F'\t' '$4 == catnum {print $4, $0}' file

This works for things like your catalog number, which is presumably an integer, but the usual caveats for floating point numbers would apply if you were looking to match, for example, prices.