<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.iwillfearnoevil.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Bash-check-if-ip-address</id>
	<title>Bash-check-if-ip-address - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.iwillfearnoevil.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Bash-check-if-ip-address"/>
	<link rel="alternate" type="text/html" href="https://wiki.iwillfearnoevil.com/mediawiki/index.php?title=Bash-check-if-ip-address&amp;action=history"/>
	<updated>2026-05-08T15:52:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://wiki.iwillfearnoevil.com/mediawiki/index.php?title=Bash-check-if-ip-address&amp;diff=603&amp;oldid=prev</id>
		<title>Chubbard at 22:01, 25 April 2024</title>
		<link rel="alternate" type="text/html" href="https://wiki.iwillfearnoevil.com/mediawiki/index.php?title=Bash-check-if-ip-address&amp;diff=603&amp;oldid=prev"/>
		<updated>2024-04-25T22:01:27Z</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&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 15:01, 25 April 2024&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-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;metadesc&gt;A simple check to confirm if something is an IP address or not.&amp;lt;/metadesc&gt;&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;this is a VERY simple check to see if you have an IP address as your variable&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 is a VERY simple check to see if you have an IP address as your variable&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;&amp;lt;pre&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;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff::1.12:old-40:rev-603 --&gt;
&lt;/table&gt;</summary>
		<author><name>Chubbard</name></author>
	</entry>
	<entry>
		<id>https://wiki.iwillfearnoevil.com/mediawiki/index.php?title=Bash-check-if-ip-address&amp;diff=40&amp;oldid=prev</id>
		<title>Chubbard: Created page with &quot;this is a VERY simple check to see if you have an IP address as your variable &lt;pre&gt; function valid_ip() {     local  ip=$1     local  stat=1      if [[ $ip =~ ^[0-9]{1,3}\.[0-...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.iwillfearnoevil.com/mediawiki/index.php?title=Bash-check-if-ip-address&amp;diff=40&amp;oldid=prev"/>
		<updated>2021-10-15T23:16:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;this is a VERY simple check to see if you have an IP address as your variable &amp;lt;pre&amp;gt; function valid_ip() {     local  ip=$1     local  stat=1      if [[ $ip =~ ^[0-9]{1,3}\.[0-...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;this is a VERY simple check to see if you have an IP address as your variable&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function valid_ip() {&lt;br /&gt;
    local  ip=$1&lt;br /&gt;
    local  stat=1&lt;br /&gt;
&lt;br /&gt;
    if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then&lt;br /&gt;
        OIFS=$IFS&lt;br /&gt;
        IFS='.'&lt;br /&gt;
        ip=($ip)&lt;br /&gt;
        IFS=$OIFS&lt;br /&gt;
        [[ ${ip[0]} -le 255 &amp;amp;&amp;amp; ${ip[1]} -le 255 \&lt;br /&gt;
            &amp;amp;&amp;amp; ${ip[2]} -le 255 &amp;amp;&amp;amp; ${ip[3]} -le 255 ]]&lt;br /&gt;
        stat=$?&lt;br /&gt;
    fi&lt;br /&gt;
    echo &amp;quot;$stat&amp;quot;&lt;br /&gt;
    return $stat&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:bash]]&lt;/div&gt;</summary>
		<author><name>Chubbard</name></author>
	</entry>
</feed>