End Bash Script Loop
Sometimes when bash scripting you might want the ability to cancel your script’s loop with CTRL-C. Below is an exampl simple script which loops through a file of domains separated by line break and it digs the A record (IP address) of the domain. Read further to learn how to force quit this script. #!/bin/bash while read p; do dig $p A +short done <listofdomains.txt If your list of domains is large your and you want to quit this script, you cant....