So I want to pass 2 strings and filename from the command line and search for both the strings in the file.
Sample input : script.sh file.txt AB 78
Sample output : 001,AB,cse,78
(where the file has this line among others that do not match)
My try:
`#/usr/bin/env bash`
`grep '$2.*$3\|$3.*$2' $1`
However this doesn't work. Can anyone help?