DEV Community

Discussion on: How Unix programmers at restaurants search menus for their favorite plate

Collapse
 
blackknight36 profile image
Michael • Edited

You can almost accomplish this entire task using awk. For example:

awk -F '$' '/shrimp/ {printf "%s- %.2f\n", $1, $NF}' < menu.txt

Collapse
 
rubberduck profile image
Christopher McClellan

awk is Turing Complete.
s/almost//