Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In bash...

    $(grep -i 'pattern' file | awk '{print $5}' | sed 's/^/cmd/g')
?

Or surround in backticks

    `command which outputs text you want to run as a command`
I prefer $() as they nest better.

Or have I misunderstood your question?



That's it $() works. thanks.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: