SyntaxFix
Write A Post
Hire A Developer
Questions
As per BashFAQ/006, you can use read with here string syntax for assigning indirect variables:
read
function grep_search() { read "$1" <<<$(ls | tail -1); }
Usage:
$ grep_search open_box $ echo $open_box stack-overflow.txt