2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -1,17 +1,16 @@
|
|||
/*REXX program displays IPv4 and IPv6 addresses for a supplied domain name.*/
|
||||
trace off /*don't show PING none─zero return code*/
|
||||
/*REXX program displays IPV4 and IPV6 addresses for a supplied domain name.*/
|
||||
parse arg tar . /*obtain optional domain name from C.L.*/
|
||||
if tar=='' then tar='www.kame.net' /*Not specified? Then use the default.*/
|
||||
tempFID='\TEMP\DNSQUERY.$$$.' /*define temp file to store the IPv4. */
|
||||
pingOpts='-l 0 -n 1 -w 1' tar /*define options for the PING command. */
|
||||
|
||||
do j=4 to 6 by 2 /*handle IPv4 and IPv6 addresses. */
|
||||
'PING' (-j) pingOpts ">" tempFID /*restrict PING's output to a minimum. */
|
||||
q=charin(tempFID,1,999) /*read the output file from PING cmd.*/
|
||||
parse var q '[' IPA ']' /*parse IP address from the output. */
|
||||
say 'IPv'j 'for domain name ' tar " is " IPA /*IPv4 or IPv6 address.*/
|
||||
call lineout tempFID /* ◄──┬─◄ needed by some REXXes to */
|
||||
end /*j*/ /* └─◄ force file integrity.*/
|
||||
|
||||
'ERASE' tempFID /*clean up (delete) the temporary file.*/
|
||||
if tar=='' then tar= 'www.kame.net' /*Not specified? Then use the default.*/
|
||||
tFID = '\TEMP\DNSQUERY.$$$' /*define temp file to store IPV4 output*/
|
||||
pingOpts= '-l 0 -n 1 -w 0' tar /*define options for the PING command. */
|
||||
trace off /*don't show PING none─zero return code*/
|
||||
/* [↓] perform 2 versions of PING cmd.*/
|
||||
do j=4 to 6 by 2 /*handle IPV4 and IPV6 addresses. */
|
||||
'PING' (-j) pingOpts ">" tFID /*restrict PING's output to a minimum. */
|
||||
q=charin(tFID, 1, 999) /*read the output file from PING cmd.*/
|
||||
parse var q '[' ipaddr "]" /*parse IP address from the output. */
|
||||
say 'IPV'j "for domain name " tar ' is ' ipaddr /*IPVx address.*/
|
||||
call lineout tFID /* ◄──┬─◄ needed by some REXXes to */
|
||||
end /*j*/ /* └─◄ force (TEMP) file integrity.*/
|
||||
/*stick a fork in it, we're all done. */
|
||||
'ERASE' tFID /*clean up (delete) the temporary file.*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue