yeah i couldnt figure out how to do what i wanted.
heres what my batch file looks like , i had ai help me write it.
@echo off
setlocal enabledelayedexpansion
if "%~3"=="" (
if "%~2"=="" (
grep -i %~1 *txt
) else (
grep -i %~1 *txt | grep -i %~2
)
) else (
grep -i %~1 *txt | grep -i %~2 | grep -i %~3
)
endlocal
it works ok.
i have my file lists in .txt files:
so i can do
s search1
returns all results for search1
s search1 search2
returns all results for search1, then filtered for search 2
s search1 search2 search3
returns all results for search1, then filtered for search 2, then filtered for search3
but i still have to type s all the time
i just want it to be a prompt and i type search1 search2, hit enter, and it spits out results, asking me for the next search...