I have a bash script as below :
#!/bin/bash
for i in `cat domains` ; do
tag=$(echo -n $i" - "; whois $i | grep -o "Expir.*")
reg=$(echo -n -" "; whois $i | grep "Registrar:")
echo $tag $reg
sleep .5s
done;
I wish to have a php page where a user can paste in a list of domains and when they hit send it calls the bash script processes the domains and returns the output. Is this possible?
while read -r i; do ...; done < domains. See Bash FAQ 001.