I'm trying to write a function that will find all processes by name and then let you send signals to them one by one. Here is the smallest part of code that I can't get to work correctly:
ps -ef | grep "$@"
If I used
ab cd
as the input to the function, I'd like it to generate
ps -ef | grep "ab cd"
but instead it generates
ps -ef | grep ab cd
which looks for 'ab' in the file 'cd'.