<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>grep &#8211; SystemTechnics</title>
	<atom:link href="https://www.systemtechnics.de/tag/grep/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.systemtechnics.de</link>
	<description>IT Consulting</description>
	<lastBuildDate>Wed, 27 Feb 2019 04:51:49 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.systemtechnics.de/wp-content/uploads/cropped-2003-logo-st-transparanet-x200-32x32.png</url>
	<title>grep &#8211; SystemTechnics</title>
	<link>https://www.systemtechnics.de</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Bash: NL (Numbering Lines)</title>
		<link>https://www.systemtechnics.de/bash-nl-numbering-lines/</link>
		
		<dc:creator><![CDATA[knut]]></dc:creator>
		<pubDate>Sun, 24 Feb 2019 06:37:49 +0000</pubDate>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[less]]></category>
		<category><![CDATA[nl]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[zeilen]]></category>
		<category><![CDATA[Zeilennummer]]></category>
		<guid isPermaLink="false">http://www.systemtechnics.de/?p=2762</guid>

					<description><![CDATA[Um eine Text-Datei mit Zeilennummern zu versehen gibt es viele Möglichkeiten. cat, awk, sed, less, grep und nl.
Hier mal ein Beispiel mit nl ]]></description>
										<content:encoded><![CDATA[
<p>Um eine Text-Datei mit Zeilennummern zu versehen gibt es viele Möglichkeiten. <em>cat, awk, sed, less, grep und nl</em>.<br />Hier mal ein Beispiel mit <em>nl</em> :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">nl -b a input-datei.txt </pre>



<figure class="wp-block-image"><img fetchpriority="high" decoding="async" width="1024" height="603" src="https://www.systemtechnics.de/wp-content/uploads/bash-nl-1024x603.png" alt="" class="wp-image-2763" srcset="https://www.systemtechnics.de/wp-content/uploads/bash-nl-1024x603.png 1024w, https://www.systemtechnics.de/wp-content/uploads/bash-nl-300x177.png 300w, https://www.systemtechnics.de/wp-content/uploads/bash-nl-768x453.png 768w, https://www.systemtechnics.de/wp-content/uploads/bash-nl.png 1714w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Unter meinem OSX ist offensichtlich die Option a als default eingestellt. Wie auf dem Screenshot zu erkennen ist, werden auch ohne extra einstellen auch die leeren Zeilen entsprechend nummeriert.</p>



<figure class="wp-block-image"><img decoding="async" width="1024" height="911" src="https://www.systemtechnics.de/wp-content/uploads/nl-options-1024x911.png" alt="" class="wp-image-2764" srcset="https://www.systemtechnics.de/wp-content/uploads/nl-options-1024x911.png 1024w, https://www.systemtechnics.de/wp-content/uploads/nl-options-300x267.png 300w, https://www.systemtechnics.de/wp-content/uploads/nl-options-768x683.png 768w, https://www.systemtechnics.de/wp-content/uploads/nl-options.png 1720w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Mailadresse von Webseiten ermitteln</title>
		<link>https://www.systemtechnics.de/mailadresse-von-webseiten-ermitteln/</link>
		
		<dc:creator><![CDATA[knut]]></dc:creator>
		<pubDate>Wed, 30 Jan 2019 04:55:20 +0000</pubDate>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[uniq]]></category>
		<guid isPermaLink="false">http://www.systemtechnics.de/?p=2736</guid>

					<description><![CDATA[Hier möchte ich kurz aufzeigen, wie einfach es ist von Webseiten die Mailadresse aus dem Code zu extrahieren und evtl. für SPAM weiter zu verwenden.]]></description>
										<content:encoded><![CDATA[
<p>Hier möchte ich kurz aufzeigen, wie einfach es ist von Webseiten die Mailadresse aus dem Code zu extrahieren und evtl. für SPAM weiter zu verwenden.</p>



<!--more-->



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">curl -# https://www.daserste.de/specials/service/ard-links-adressen-100.html | grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" | sort | uniq</pre>



<p>Zuerst verwenden wir den Befehl <em>curl</em> um den html-Code auszugeben. Diesen &#8222;schicken&#8220; wir dann weiter zu <em>grep</em>, der mit dem Pattern für gültige Mailadressen dieses aus dem Code extrahiert. Zur besseren Übersicht wird das Ergebnis von grep noch sortiert (<em>sort</em>) und eventuell doppelte Einträge entfernt (<em>uniq</em>).</p>



<p>Wer das öfters zu Demonstrationszwecken tun möchte, der kann auch gerne eine kleine Funktion in .profile abspeichern.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">function get-mailadr-from-website {
	curl  -# $1 | grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" | sort | uniq		 
}</pre>



<figure class="wp-block-image"><img decoding="async" width="1024" height="599" src="https://www.systemtechnics.de/wp-content/uploads/mailextract-1024x599.png" alt="" class="wp-image-2738" srcset="https://www.systemtechnics.de/wp-content/uploads/mailextract-1024x599.png 1024w, https://www.systemtechnics.de/wp-content/uploads/mailextract-300x175.png 300w, https://www.systemtechnics.de/wp-content/uploads/mailextract-768x449.png 768w, https://www.systemtechnics.de/wp-content/uploads/mailextract.png 1728w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Bash &#8211; Öffentliche IP ermitteln</title>
		<link>https://www.systemtechnics.de/bash-oeffentliche-ip-ermitteln/</link>
		
		<dc:creator><![CDATA[knut]]></dc:creator>
		<pubDate>Mon, 16 May 2016 17:22:43 +0000</pubDate>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux/OSX]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[wget]]></category>
		<guid isPermaLink="false">http://www.systemtechnics.de/?p=1629</guid>

					<description><![CDATA[Manchmal ist es sehr praktisch die öffentliche IP des momentanen Internet-Anschlusses zu ermitteln. Mit folgendem BASH Einzeiler kann man dies [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Manchmal ist es sehr praktisch die öffentliche IP des momentanen Internet-Anschlusses zu ermitteln. Mit folgendem BASH Einzeiler kann man dies sehr einfach bewerkstelligen.</p>
<p><span id="more-1629"></span></p>
<pre><code>wget http://ip.tx2.net -q -O - | grep -Eo '\< [[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'</code></pre>
<p><img loading="lazy" decoding="async" src="/wp-content/uploads/bash-oeff-ip.png" alt="bash-oeff-ip" width="871" height="506" /></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
