Here the alternative ways,
In grep -y and -i options are the same ,so here for both you can use the same sed expression.
For -w option you can use the following,Code:sed -nr '/[h|H][e|E][l|L][l|L][O|o]/p' filename
Here \b represents the word boundary.Code:sed -n '/\bhello\b/p' filename
For the -f options I created the simple script to achieve that.
Thanks.Code:patterns=`cat patterfile` for i in $patterns do val=`sed -ne "/$i/p" searchfile` echo -e "$val" done