I am using fish
shell and I can't seem to set the output of awk
to a variable.
set installed_version (scala -version 2>&1 | awk 'NR==1{ print $5 }')
Any ideas why that's the case?
Edit: This works though
set foo (java -version 2>&1 | awk 'NR==1{ print $3 }')