so, grepped_exp is just my way of saying it's the same expression. it's not a variable.
the purpose of the code (thought it was clear from itself) is to grep an expression in a dir. and open gvim with split windows and search for/highlight that expression in gvim.
meaning, for example: grepping "Linux". finding 2 results. opening gvim and splitting the window to the two result files, and highlighting "Linux" in them.
the only missing piece of the puzzle is - how do I get the 3rd argument from the command before the pipe, when after the pipe, I'm using an alias.
and one last thing, I don't think of a way to define the alias right before the command executes - that wouldn't be efficient. I want an alias I can remember.
Not sure I clearly understood the concept. If it's in a script, why use an alias and not write it down using variables?
How about declaring the entire line as a shell function?