I have the following bash script that takes a text file and opens a tab in the default internet browser with a google query (after some clean ups) per line. I want to make a version of this script that works in Windows.
My question is what should I be looking at. I know windows doesn't have bash, nor sed. What is the easiest approach to this on windows?
#!/bin/bash
URL="https://www.google.pt/?sesinv=1#output=search&q="
TMP=tmp.txt
if [ "$(uname)" == "Linux" ];then
alias open=xdg-open
fi
sed -e '/^+++/d' -e '/^---/d' -e '/^@@/d' -e 's/^[ +-]*[0-9]* //g' $1 > $TMP
while read line
do
echo "Opening $line"
open -g "$URL$line"
done <$TMP
rm -f $TMP