Perl https://tech.feedyourhead.at/ en Replace text in files https://tech.feedyourhead.at/node/173 <span class="field field--name-title field--type-string field--label-hidden">Replace text in files</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>It's pretty comfortable to search and replace text in files using perl and regular expressions. Using one single command we can search, replace and create backups of all the files at once.</p> <p>Let's create a file first:</p> <pre> <code> echo "perl is Kewl" &gt;&gt; regtext.txt; </code></pre> <p>Now let's do the trick:</p> <pre> <code> perl -p -i.bak -e 's/k|Kewl/cool/g' regtext.txt </code></pre> <p>This command will search for Kewl in regtext.txt and will replace it with cool and it will create a backupfile called regtext.txt.bak.&nbsp;</p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Apr 03 2016</span> <div class="field field--name-field-tagies field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class='field__items'> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/perl" hreflang="en">Perl</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/shell" hreflang="en">Shell</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/tricks" hreflang="en">Tricks</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/one-liner" hreflang="en">One-Liner</a></div> </div> </div> <section class="field field--name-comment-node-blog field--type-comment field--label-hidden comment-wrapper"> </section> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class='title comment-form__title'> <i class="fa fa-comments-o"></i> Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=173&amp;2=comment&amp;3=comment" token="LnQFo-wuKugdBAIZFHvVSTYysbQhIBJxX1jeIe00eI8"></drupal-render-placeholder> </section> Sun, 03 Apr 2016 12:26:59 +0000 Hoti 173 at https://tech.feedyourhead.at Monitoring memcached https://tech.feedyourhead.at/content/monitoring-memcached <span class="field field--name-title field--type-string field--label-hidden">Monitoring memcached </span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><a href="https://code.google.com/archive/p/memcache-top/">memcachetop</a> is a nice perl-script for displaying live stats from memcached. The author kept portability in mind, so it has not much dependencies and might run on many systems.</p></div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Feb 04 2016</span> <div class="field field--name-field-tagies field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class='field__items'> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/proxy" hreflang="en">Proxy</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Linux" hreflang="en">Linux</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/perl" hreflang="en">Perl</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/external" hreflang="en">External</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/tricks" hreflang="en">Tricks</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/shell" hreflang="en">Shell</a></div> </div> </div> <section class="field field--name-comment-node-blog field--type-comment field--label-hidden comment-wrapper"> </section> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class='title comment-form__title'> <i class="fa fa-comments-o"></i> Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=157&amp;2=comment&amp;3=comment" token="-iLsmT2V6NjNo45ZYAATeglqMuBQMCC9q9NxlEjVmTM"></drupal-render-placeholder> </section> Thu, 04 Feb 2016 09:06:32 +0000 Hoti 157 at https://tech.feedyourhead.at mail2sms https://tech.feedyourhead.at/content/mail2sms <span class="field field--name-title field--type-string field--label-hidden">mail2sms</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>This archive contains all necessary config-files and scripts to setup a mail2sms-gateway using an old-school mobile phone. I used for this a raspberry pi.</p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Feb 06 2015</span> <div class="field field--name-field-datei field--type-file field--label-above"> <div class="field__label">File</div> <div class="field__item"> <span class="file file--mime-application-octet-stream file--general"> <a href="https://tech.feedyourhead.at/sites/default/files/DateiUploads/mail2sms.tar_0.gz" type="application/octet-stream; length=6484">mail2sms.tar.gz</a></span> </div> </div> <div class="clearfix text-formatted field field--name-field-md5sum field--type-text field--label-above"> <div class="field__label">md5sum</div> <div class="field__item">8e5f1239069ce6c5aaa496f71722ee51</div> </div> <div class="clearfix text-formatted field field--name-field-sha256sum field--type-text field--label-above"> <div class="field__label">sha256sum</div> <div class="field__item">1cd76362d840ae672bec46afd90216769d9082180959dc7820ec61405a7ae7b3</div> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class="field__items"> <div class="field__item"><a href="/tags/downloads" hreflang="en">Downloads</a></div> <div class="field__item"><a href="/tags/raspberry" hreflang="en">Raspberry</a></div> <div class="field__item"><a href="/tags/perl" hreflang="en">Perl</a></div> <div class="field__item"><a href="/tags/sysadmin" hreflang="en">Sysadmin</a></div> <div class="field__item"><a href="/tags/email" hreflang="en">Email</a></div> <div class="field__item"><a href="/Programming" hreflang="en">Programming</a></div> </div> </div> <section class="field field--name-comment-node-download field--type-comment field--label-hidden comment-wrapper"> </section> Fri, 06 Feb 2015 13:39:57 +0000 Hoti 46 at https://tech.feedyourhead.at stegif.pl https://tech.feedyourhead.at/content/stegifpl <span class="field field--name-title field--type-string field--label-hidden">stegif.pl</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Guess What</p></div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Dec 19 2014</span> <div class="field field--name-field-datei field--type-file field--label-above"> <div class="field__label">File</div> <div class="field__item"> <span class="file file--mime-application-octet-stream file--general"> <a href="https://tech.feedyourhead.at/sites/default/files/DateiUploads/stegif_0.gz" type="application/octet-stream; length=516">stegif.gz</a></span> </div> </div> <div class="clearfix text-formatted field field--name-field-md5sum field--type-text field--label-above"> <div class="field__label">md5sum</div> <div class="field__item">0d5354770b2a84bea83716c9787b9808</div> </div> <div class="clearfix text-formatted field field--name-field-sha256sum field--type-text field--label-above"> <div class="field__label">sha256sum</div> <div class="field__item">9b6c2197c1358fc9c119c3f297a8360d2c8dd63e5681381fa3b3af29727ba3c1</div> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class="field__items"> <div class="field__item"><a href="/tags/downloads" hreflang="en">Downloads</a></div> <div class="field__item"><a href="/tags/perl" hreflang="en">Perl</a></div> <div class="field__item"><a href="/Fun" hreflang="en">Fun</a></div> </div> </div> <section class="field field--name-comment-node-download field--type-comment field--label-hidden comment-wrapper"> </section> Fri, 19 Dec 2014 17:01:20 +0000 Hoti 48 at https://tech.feedyourhead.at Guess what.. https://tech.feedyourhead.at/content/guess-what <span class="field field--name-title field--type-string field--label-hidden">Guess what..</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><img alt="" src="http://tech.feedyourhead.at/sites/tech.feedyourhead.at/files/pictures/stegif.gif" /></p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Dec 19 2014</span> <div class="field field--name-field-tagies field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class='field__items'> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Fun" hreflang="en">Fun</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Programming" hreflang="en">Programming</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/perl" hreflang="en">Perl</a></div> </div> </div> <section class="field field--name-comment-node-blog field--type-comment field--label-hidden comment-wrapper"> </section> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class='title comment-form__title'> <i class="fa fa-comments-o"></i> Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=26&amp;2=comment&amp;3=comment" token="DlHzb4c3ll6eORQiZAxAlDl2xxGjcquBWx-IdVT-xfk"></drupal-render-placeholder> </section> Fri, 19 Dec 2014 07:35:58 +0000 Hoti 26 at https://tech.feedyourhead.at Converting UNIX-Timestamp into a readable time-format https://tech.feedyourhead.at/content/converting-unix-timestamp-readable-time-format <span class="field field--name-title field--type-string field--label-hidden">Converting UNIX-Timestamp into a readable time-format</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Assume we have a nagios-logfile(nagios.log) like this:</p> <pre> <code> [1416415259] PASSIVE HOST CHECK: server1;0;PING OK - Packet loss = 0%, RTA = 0.04 ms [1416415259] PASSIVE HOST CHECK: server2;0;PING OK - Packet loss = 0%, RTA = 0.04 ms [1416415259] EXTERNAL COMMAND: PROCESS_HOST_CHECK_RESULT;server3;0;PING OK - Packet loss = 0%, RTA = 0.15 ms </code></pre> <p>Then we can convert the UNIX-Timestamp using the following command:</p> <pre> <code> perl -n -e 'if ($_ =~ m/^\[(\d+)\] (.*)$/g){ print scalar localtime($1) . " $2" ."\n"; }' nagios.log </code></pre> <p>This would be our output then:</p> <pre> <code> Wed Nov 19 17:40:59 2014 PASSIVE HOST CHECK: server1;0;PING OK - Packet loss = 0%, RTA = 0.04 ms Wed Nov 19 17:40:59 2014 PASSIVE HOST CHECK: server2;0;PING OK - Packet loss = 0%, RTA = 0.04 ms Wed Nov 19 17:40:59 2014 EXTERNAL COMMAND: PROCESS_HOST_CHECK_RESULT;server3;0;PING OK - Packet loss = 0%, RTA = 0.15 ms </code></pre> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Nov 19 2014</span> <div class="field field--name-field-tagies field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class='field__items'> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Linux" hreflang="en">Linux</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Nagios" hreflang="en">Nagios</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/one-liner" hreflang="en">One-Liner</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/bash" hreflang="en">Bash</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/perl" hreflang="en">Perl</a></div> </div> </div> <section class="field field--name-comment-node-blog field--type-comment field--label-hidden comment-wrapper"> </section> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class='title comment-form__title'> <i class="fa fa-comments-o"></i> Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=16&amp;2=comment&amp;3=comment" token="EB6QcaYCufqwNDXs6N9Q8dAWj4FsozjpCPYWAbAx0pc"></drupal-render-placeholder> </section> Wed, 19 Nov 2014 16:45:34 +0000 Hoti 16 at https://tech.feedyourhead.at Monitoring Horde-Framework-Upgrades using Nagios https://tech.feedyourhead.at/content/monitoring-horde-framework-upgrades-using-nagios <span class="field field--name-title field--type-string field--label-hidden">Monitoring Horde-Framework-Upgrades using Nagios</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><a href="http://www.nagios.org" target="_blank"><img alt="" src="http://tech.feedyourhead.at/sites/tech.feedyourhead.at/files/pictures/nagios-logo.jpg" style="float: right;" /></a><a href="http://www.horde.org" target="_blank"><img alt="" src="http://tech.feedyourhead.at/sites/tech.feedyourhead.at/files/pictures/445px-Horde-logo.svg.png" style="width: 325px; height: 131px;" /></a></p> <p>Nagios is an awesome monitoring-tool. I give my best to check as much services as possible with nagios. Here I want to explain how I check if updates for the Horde-Framework exist...</p> <p>Although horde uses pear for update-management I don't want to check pear directly(because of permissions and of course I don't want to create too much traffic on the horde-repository). That's why i use the following cronjob which checks for upgrades once an hour:</p> <pre> <code> 45 * * * * pear list-upgrades > /var/log/pear_check_updates.log </code></pre> <p>Now this nagios-check(check_pear_updates.pl) can use this information:</p> <pre> <code> #!/usr/bin/perl ########################################################################### # # you need a cronjob with this command: # pear list-upgrades > /var/log/pear_check_updates.log # ########################################################################## my $pearchannel = 'Waynes World! Waynes World! Party time! Excellent!'; my @logarr = undef; my $found = 0; my $checkother = 0; my $available_upgrades = 0; my $ret = 2; if($#ARGV < 0) { print "usage: $0 <log-file> [ <pear-channel> ]\n"; exit 3; } my $pearlog = $ARGV[0]; $pearchannel = $ARGV[1] if($#ARGV > 0); unless(open(PEARLOG,"< $pearlog")) { print "Error: can not open logfile: $pearlog\n"; exit 3; } while(<PEARLOG>) { my $tmp = $_; $available_upgrades++ if($tmp =~ /AVAILABLE UPGRADES/); if($tmp =~ /^Channel $pearchannel/) { print $tmp; } else { my @tmparr = split(/\s+/,$tmp); if($tmparr[0] eq $pearchannel) { print "$tmparr[1] $tmparr[2] $tmparr[3] $tmparr[4] $tmparr[5] $tmparr[6],"; $found = 1; } } push(@logarr,$tmp); } close(PEARLOG); exit $ret if($found == 1); if($checkother == 1) { if($available_upgrades > 0) { print "found $available_upgrades other updates than $pearchannel\n"; exit 1; } } exit 0; </code></pre> <p>If we correctly set the permissions for the&nbsp; pear-logfile, our nagios-check can read it.</p> <p><a href="http://tech.feedyourhead.at/content/checkpearupgrade">Here is the download to the full source-code</a></p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Nov 19 2014</span> <div class="field field--name-field-tagies field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class='field__items'> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Linux" hreflang="en">Linux</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/horde" hreflang="en">Horde</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Nagios" hreflang="en">Nagios</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/perl" hreflang="en">Perl</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Programming" hreflang="en">Programming</a></div> </div> </div> <section class="field field--name-comment-node-blog field--type-comment field--label-hidden comment-wrapper"> </section> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class='title comment-form__title'> <i class="fa fa-comments-o"></i> Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=13&amp;2=comment&amp;3=comment" token="IpQiXavlekgUkoMY55I96KcK_vUoClR5uCQ4Y4laa90"></drupal-render-placeholder> </section> Wed, 19 Nov 2014 13:16:42 +0000 Hoti 13 at https://tech.feedyourhead.at Half-Automatic Update-Script(apt) https://tech.feedyourhead.at/content/half-automatic-update-scriptapt <span class="field field--name-title field--type-string field--label-hidden">Half-Automatic Update-Script(apt)</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>I want to have control over debian updates, but I don't want to make them manually. So I decided to do it "half-automatic". This means that they run automatically until user-input is needed. The whole prozess is recorded in logfiles and after the updates are done this script sends out emails.</p> <p>This is the parser for the summary-email. it works for english ang german environments:</p> <pre> <code lang="perl"> #!/usr/bin/perl use strict; if ( $#ARGV ne 0) { die "usage: $0 \n"; } my $logfile = $ARGV[0]; my $upgrades = undef; open(LOG,"&lt; $logfile") or die "can't open logfile: $logfile"; while() { my $line = $_; if($line =~ /The following packages will be upgraded/g) { $line = ; while($line !~ /\d+ upgraded, \d+ newly installed, \d+ to remove and \d+ not upgraded/) { $upgrades = $upgrades . " " . $line; $line = ; } } if($line =~ /Die folgenden Pakete werden aktualisiert/g) { $line = ; while($line !~ /\d+ aktualisiert, \d+ neu installiert, \d+ zu entfernen und \d+ nicht aktualisiert./) { $upgrades = $upgrades . " " . $line; $line = ; } } } close(LOG); $upgrades =~ s/^\s+//g; $upgrades =~ s/\r+//g; $upgrades =~ s/\n+//g; if($upgrades =~ /^\s+$/g or $upgrades =~ /^$/g or $upgrades =~ /^\n$/g) { exit 0; } my @arr = split(/\s+/,$upgrades); print "$upgrades \n"; exit $#arr + 1; </code></pre> <p>And this is our update-script:</p> <pre> <div class="geshifilter"><pre class="bash geshifilter-bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span> &nbsp; <span style="color: #007800;">LOGDIR</span>=<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>update-logs <span style="color: #007800;">PARSER</span>=<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>aptlogparser.pl &nbsp; <span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ssh-agent</span> -s<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #c20cb9; font-weight: bold;">ssh-add</span> &nbsp; <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">TERM</span>=<span style="color: #ff0000;">&quot;rxvt&quot;</span> &nbsp; <span style="color: #000000; font-weight: bold;">function</span> update_customer <span style="color: #7a0874; font-weight: bold;">&#123;</span> <span style="color: #000000; font-weight: bold;">for</span> host <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$HOSTS</span> <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #007800;">DAT</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>F-<span style="color: #000000; font-weight: bold;">%</span>R<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;KUNDE: <span style="color: #007800;">$KUNDE</span>&quot;</span> script <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;ssh -l root <span style="color: #007800;">$host</span> <span style="color: #000099; font-weight: bold;">\&quot;</span>export TERM=rxvt; export DEBIAN_FRONTEND=readline; echo <span style="color: #007800;">$TERM</span>; hostname; apt-get update; apt-get upgrade<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-e</span> typescript <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #c20cb9; font-weight: bold;">mv</span> typescript <span style="color: #007800;">$LOGDIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$host</span>-<span style="color: #007800;">$DAT</span>.log <span style="color: #007800;">UPDATES</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #007800;">$PARSER</span> <span style="color: #007800;">$LOGDIR</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$host</span>-<span style="color: #007800;">$DAT</span>.log<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$?</span> <span style="color: #660033;">-ne</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>: <span style="color: #007800;">$UPDATES</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #800000;">${KUNDE}</span>_EMAIL.txt <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #800000;">${KUNDE}</span>_EMAIL.txt <span style="color: #000000; font-weight: bold;">fi</span> <span style="color: #000000; font-weight: bold;">done</span> &nbsp; <span style="color: #007800;">DAT</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>F<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-e</span> <span style="color: #800000;">${KUNDE}</span>_EMAIL.txt <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #800000;">${KUNDE}</span>_EMAIL.txt <span style="color: #000000; font-weight: bold;">|</span> mutt <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;Linux-Updates vom <span style="color: #007800;">$DAT</span>&quot;</span> <span style="color: #660033;">--</span> <span style="color: #007800;">$EMAIL</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #800000;">${KUNDE}</span>_EMAIL.txt <span style="color: #000000; font-weight: bold;">fi</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span> &nbsp; &nbsp; <span style="color: #007800;">HOSTS</span>=<span style="color: #ff0000;">&quot;websrv mailsrv&quot;</span> <span style="color: #007800;">EMAIL</span>=<span style="color: #ff0000;">&quot;bob@example.com&quot;</span> <span style="color: #007800;">KUNDE</span>=<span style="color: #ff0000;">&quot;customer1&quot;</span> update_customer &nbsp; <span style="color: #007800;">HOSTS</span>=<span style="color: #ff0000;">&quot;linuxsrv1 linuxsrv2&quot;</span> <span style="color: #007800;">EMAIL</span>=<span style="color: #ff0000;">&quot;alice@example.com&quot;</span> <span style="color: #007800;">KUNDE</span>=<span style="color: #ff0000;">&quot;customer2&quot;</span> update_customer</pre></div></pre> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Nov 12 2014</span> <div class="field field--name-field-tagies field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class='field__items'> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/sysadmin" hreflang="en">Sysadmin</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Linux" hreflang="en">Linux</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Programming" hreflang="en">Programming</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/bash" hreflang="en">Bash</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/perl" hreflang="en">Perl</a></div> </div> </div> <section class="field field--name-comment-node-blog field--type-comment field--label-hidden comment-wrapper"> </section> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class='title comment-form__title'> <i class="fa fa-comments-o"></i> Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=12&amp;2=comment&amp;3=comment" token="gsI_b4s7jeSkQ5EGNx2lBXiItBywcZaYbU-FLbZT6U0"></drupal-render-placeholder> </section> Wed, 12 Nov 2014 09:12:45 +0000 Hoti 12 at https://tech.feedyourhead.at