The problem is that single quotes have no special meaning in Tcl, they're just ordinary characters in a string. Thus the $4
is not hidden from Tcl and it tries to expand the variable.
The Tcl equivalent to shell single quotes are braces. This is what you need:
exec awk {{print $4}} foo
The double braces look funny, but the outer pair are for Tcl and the inner pair are for awk.
Btw, the Tcl translation of that awk program is:
set fid [open foo r]
while {[gets $fid line] != -1} {
set fields [regexp -all -inline {\S+} $line]
puts [lindex $fields 3]
}
close $fid