I want to make function that parses from text pasted in a terminal.
$ cat <<eof | grep --color sometext
> foo
> sometext
> sometext1
> a sometext
> asdf
>
> eof
sometext
sometext1
a sometext
While the above works I can make neither an alias nor a function of it.
alias gsi='cat <<eof | grep --color "$1"'
gsi { cat <<eof | grep --color "$1" ; }
I thought redirections weren't executed during function definition.