<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://alteeve.com/w/index.php?action=history&amp;feed=atom&amp;title=Ip_to_hex</id>
	<title>Ip to hex - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://alteeve.com/w/index.php?action=history&amp;feed=atom&amp;title=Ip_to_hex"/>
	<link rel="alternate" type="text/html" href="https://alteeve.com/w/index.php?title=Ip_to_hex&amp;action=history"/>
	<updated>2026-05-03T02:30:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://alteeve.com/w/index.php?title=Ip_to_hex&amp;diff=4751&amp;oldid=prev</id>
		<title>Digimer at 03:19, 5 May 2013</title>
		<link rel="alternate" type="text/html" href="https://alteeve.com/w/index.php?title=Ip_to_hex&amp;diff=4751&amp;oldid=prev"/>
		<updated>2013-05-05T03:19:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:19, 5 May 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This script takes an IPv4 address and converts it to a [[hexadecimal]] string suitable for use with PXE server configuration file names.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This script takes an IPv4 address and converts it to a [[hexadecimal]] string suitable for use with PXE server configuration file names.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Download the perl source: [https://alteeve.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;com&lt;/del&gt;/files/ip_to_hex ip_to_hex].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Download the perl source: [https://alteeve.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ca&lt;/ins&gt;/files/ip_to_hex ip_to_hex].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#!/usr/bin/perl&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#!/usr/bin/perl&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Author:  Digimer; digimer@alteeve.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;com&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Author:  Digimer; digimer@alteeve.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ca&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Date:    Jun. 21, 2010&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Date:    Jun. 21, 2010&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# License: GPLv2&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# License: GPLv2&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key an_wiki-mediawiki-:diff:1.41:old-1729:rev-4751:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Digimer</name></author>
	</entry>
	<entry>
		<id>https://alteeve.com/w/index.php?title=Ip_to_hex&amp;diff=1729&amp;oldid=prev</id>
		<title>Digimer: Created page with &#039;{{howto_header}}  This script takes an IPv4 address and converts it to a hexadecimal string suitable for use with PXE server configuration file names.  Download the perl sour…&#039;</title>
		<link rel="alternate" type="text/html" href="https://alteeve.com/w/index.php?title=Ip_to_hex&amp;diff=1729&amp;oldid=prev"/>
		<updated>2010-06-22T03:44:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;{{howto_header}}  This script takes an IPv4 address and converts it to a &lt;a href=&quot;/w/Hexadecimal&quot; title=&quot;Hexadecimal&quot;&gt;hexadecimal&lt;/a&gt; string suitable for use with PXE server configuration file names.  Download the perl sour…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Páàjì titun&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{howto_header}}&lt;br /&gt;
&lt;br /&gt;
This script takes an IPv4 address and converts it to a [[hexadecimal]] string suitable for use with PXE server configuration file names.&lt;br /&gt;
&lt;br /&gt;
Download the perl source: [https://alteeve.com/files/ip_to_hex ip_to_hex].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/perl&lt;br /&gt;
# Author:  Digimer; digimer@alteeve.com&lt;br /&gt;
# Date:    Jun. 21, 2010&lt;br /&gt;
# License: GPLv2&lt;br /&gt;
&lt;br /&gt;
# Be clean&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
&lt;br /&gt;
# Read the IP address&lt;br /&gt;
my $ip=$ARGV[0];&lt;br /&gt;
&lt;br /&gt;
# Sanity-check it.&lt;br /&gt;
usage() if not $ip;&lt;br /&gt;
my ($a, $b, $c, $d)=($ip=~/(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/);&lt;br /&gt;
usage() if ((not defined $a) || (not defined $b) || (not defined $c) || (not defined $d));&lt;br /&gt;
&lt;br /&gt;
# Convert and print&lt;br /&gt;
print $ip.&amp;quot; = &amp;quot;.convert($a).convert($b).convert($c).convert($d), &amp;quot;\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
exit (0);&lt;br /&gt;
&lt;br /&gt;
sub convert&lt;br /&gt;
{&lt;br /&gt;
        my ($dec)=@_;&lt;br /&gt;
&lt;br /&gt;
        # Convert the decimal to hexadecimal and pad the result with a leading&lt;br /&gt;
        # zero if needed.&lt;br /&gt;
        my $hex = sprintf(&amp;quot;%x&amp;quot;, $dec);&lt;br /&gt;
        $hex=length($hex) == 1 ? &amp;quot;0&amp;quot;.$hex : $hex;&lt;br /&gt;
&lt;br /&gt;
        # Return the upercase result.&lt;br /&gt;
        return (uc($hex));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Useful death.&lt;br /&gt;
sub usage&lt;br /&gt;
{&lt;br /&gt;
        print &amp;quot;\nPlease pass in the IP address as the only argument.\n&amp;quot;;&lt;br /&gt;
        print &amp;quot;Do not pass the netmask. Example:\n&amp;quot;;&lt;br /&gt;
        print &amp;quot;\n\t./ip_to_hex 192.168.1.100\n\n&amp;quot;;&lt;br /&gt;
        exit(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{footer}}&lt;/div&gt;</summary>
		<author><name>Digimer</name></author>
	</entry>
</feed>