CryptoWorkbench/regex-lookup.bash
DarkFeather 9d7dc8d2fe Fixes
2017-12-04 20:07:01 -06:00

15 lines
398 B
Bash

#!/bin/bash
if [ ! -x /usr/bin/curl ]; then
echo No curl installed!
exit 1
fi
if [ "$1" == "" ]; then
echo "Usage: $0 [search] [optional filter]"
exit 1
fi
export bashstr="$(printf "curl -s --data 'str=%s&fstr=%s&ifun=if&ccg=all&search=Search' https://visca.com/regexdict/" "$1" "$2")"
bash -c "$bashstr" | egrep 'any matches|yourdictionary' | cut -f 2 -d '>' | cut -f 1 -d '<'