Pass a short string to stdin.
Section: Redirection
Use a here string
bash
bash
grep -o '[0-9]\+' <<< 'order-123'Explanation
Useful for compact one-liners and tests.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Redirection