i was doing a lot of grepping and it was causing a toll on my hands typing all the extra characters.
so i made a bat file
g.bat:
@echo off
grep -i %1 * | grep -i %2
now i'm wondering if i can make it so i just run it once, and i can just type the grep search words over and over again ?
what i mean is: instead of:
grep -i foo * | grep -i bar
grep -i foo1 * | grep -i bar1
and then, with bat file it looks like this:
g foo bar
g foo1 bar1
i can just do
g.bat
foo bar
(results for foo bar)
foo1 bar1
(results for foo1 bar1)
foo2 bar2
(results for foo2 bar2)
without having to type g each time.
also would be nice to be able to do g foo (it currently errors because the second grep is empty), or g foo bar zed hex whatever number of grep searches i need to do at once.
its been so long i cant remember what this stuff is even called in batch to search how to script it.