<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://mars.merhot.dk/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Astifl</id>
		<title>Teknologisk videncenter - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://mars.merhot.dk/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Astifl"/>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php/Special:Contributions/Astifl"/>
		<updated>2026-05-05T07:53:16Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.29.0</generator>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Talk:UNIX_assignments&amp;diff=1028</id>
		<title>Talk:UNIX assignments</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Talk:UNIX_assignments&amp;diff=1028"/>
				<updated>2009-02-12T19:04:40Z</updated>
		
		<summary type="html">&lt;p&gt;Astifl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Answer ==&lt;br /&gt;
Sorry but cant reach the server from home. (Problem on gateway)&lt;br /&gt;
Will you please cut-and-paste a copy of your program on the Wiki.&lt;br /&gt;
 :-) Henrik&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tiedote ==&lt;br /&gt;
It's made in WIKI on the name &amp;quot;PINGUIN&amp;quot; at the search... Thanks. ILja&lt;/div&gt;</summary>
		<author><name>Astifl</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Talk:UNIX_assignments&amp;diff=1016</id>
		<title>Talk:UNIX assignments</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Talk:UNIX_assignments&amp;diff=1016"/>
				<updated>2009-02-12T15:43:44Z</updated>
		
		<summary type="html">&lt;p&gt;Astifl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you give an advise - what's wrong with 14th line?&lt;br /&gt;
Program's name is &amp;quot;PINGUIN&amp;quot;&lt;br /&gt;
&lt;br /&gt;
||||||program begins|||||&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
K=&amp;quot;yes&amp;quot;&lt;br /&gt;
A=0&lt;br /&gt;
&lt;br /&gt;
  while test $K=&amp;quot;yes&amp;quot;&lt;br /&gt;
  do&lt;br /&gt;
&lt;br /&gt;
adresses=&amp;quot;192.168.142.1 mars.tekkom.dk 172.16.4.77&amp;quot;&lt;br /&gt;
for adress in $adresses&lt;br /&gt;
  do&lt;br /&gt;
&lt;br /&gt;
if ping -c $adress &amp;gt;/dev/null&lt;br /&gt;
  then echo &amp;quot;Ping $adress  succeded.&amp;quot;&lt;br /&gt;
  else echo &amp;quot;Ping $adress Failed.&amp;quot; | $A=`expr $A + 1`&lt;br /&gt;
fi&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
if test $A -ge 3 then $A=0 |&lt;br /&gt;
  write astifl [&amp;quot;3 times failed&amp;quot;]|&lt;br /&gt;
  mail astifl [&amp;quot;3 times failed&amp;quot;]&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sleep 60&lt;br /&gt;
done&lt;br /&gt;
|||||end of program|||||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's writing smth like this &lt;br /&gt;
Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]&lt;br /&gt;
            [-p pattern] [-s packetsize] [-t ttl] [-I interface or address]&lt;br /&gt;
            [-M mtu discovery hint] [-S sndbuf]&lt;br /&gt;
            [ -T timestamp option ] [ -Q tos ] [hop1 ...] destination&lt;br /&gt;
./PINGUIN: line 14: 0=1: command not found&lt;br /&gt;
ping: bad number of packets to transmit.&lt;br /&gt;
./PINGUIN: line 14: 0=1: command not found&lt;br /&gt;
Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]&lt;br /&gt;
            [-p pattern] [-s packetsize] [-t ttl] [-I interface or address]&lt;br /&gt;
            [-M mtu discovery hint] [-S sndbuf]&lt;br /&gt;
            [ -T timestamp option ] [ -Q tos ] [hop1 ...] destination&lt;br /&gt;
./PINGUIN: line 14: 0=1: command not found&lt;/div&gt;</summary>
		<author><name>Astifl</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Talk:UNIX_assignments&amp;diff=1015</id>
		<title>Talk:UNIX assignments</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Talk:UNIX_assignments&amp;diff=1015"/>
				<updated>2009-02-12T15:41:47Z</updated>
		
		<summary type="html">&lt;p&gt;Astifl: New page: Could you give an advise - what's wrong with 14th line?  ||||||program begins||||| #!/bin/bash K=&amp;quot;yes&amp;quot; A=0    while test $K=&amp;quot;yes&amp;quot;   do  adresses=&amp;quot;192.168.142.1 mars.tekkom.dk 172.16.4.77&amp;quot; ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you give an advise - what's wrong with 14th line?&lt;br /&gt;
&lt;br /&gt;
||||||program begins|||||&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
K=&amp;quot;yes&amp;quot;&lt;br /&gt;
A=0&lt;br /&gt;
&lt;br /&gt;
  while test $K=&amp;quot;yes&amp;quot;&lt;br /&gt;
  do&lt;br /&gt;
&lt;br /&gt;
adresses=&amp;quot;192.168.142.1 mars.tekkom.dk 172.16.4.77&amp;quot;&lt;br /&gt;
for adress in $adresses&lt;br /&gt;
  do&lt;br /&gt;
&lt;br /&gt;
if ping -c $adress &amp;gt;/dev/null&lt;br /&gt;
  then echo &amp;quot;Ping $adress  succeded.&amp;quot;&lt;br /&gt;
  else echo &amp;quot;Ping $adress Failed.&amp;quot; | $A=`expr $A + 1`&lt;br /&gt;
fi&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
if test $A -ge 3 then $A=0 |&lt;br /&gt;
  write astifl [&amp;quot;3 times failed&amp;quot;]|&lt;br /&gt;
  mail astifl [&amp;quot;3 times failed&amp;quot;]&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sleep 60&lt;br /&gt;
done&lt;br /&gt;
|||||end of program|||||&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's writing smth like this &lt;br /&gt;
Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]&lt;br /&gt;
            [-p pattern] [-s packetsize] [-t ttl] [-I interface or address]&lt;br /&gt;
            [-M mtu discovery hint] [-S sndbuf]&lt;br /&gt;
            [ -T timestamp option ] [ -Q tos ] [hop1 ...] destination&lt;br /&gt;
./PINGUIN: line 14: 0=1: command not found&lt;br /&gt;
ping: bad number of packets to transmit.&lt;br /&gt;
./PINGUIN: line 14: 0=1: command not found&lt;br /&gt;
Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline]&lt;br /&gt;
            [-p pattern] [-s packetsize] [-t ttl] [-I interface or address]&lt;br /&gt;
            [-M mtu discovery hint] [-S sndbuf]&lt;br /&gt;
            [ -T timestamp option ] [ -Q tos ] [hop1 ...] destination&lt;br /&gt;
./PINGUIN: line 14: 0=1: command not found&lt;/div&gt;</summary>
		<author><name>Astifl</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=UNIX_assignments&amp;diff=1014</id>
		<title>UNIX assignments</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=UNIX_assignments&amp;diff=1014"/>
				<updated>2009-02-12T15:07:06Z</updated>
		
		<summary type="html">&lt;p&gt;Astifl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Linux]][[Category:UNIX]]&lt;br /&gt;
== Network management with ping ==&lt;br /&gt;
Write a bash script that will ping 192.168.142.1, mars.tekkom.dk, 172.16.4.77 '''once''' every minute. If it fails three times in a row (Three minutes) it should write to your terminal and send a mail to you. You have to be logged in twice. &lt;br /&gt;
*One session where you run your program&lt;br /&gt;
*Another session where you will receive your messages and read your mail&lt;br /&gt;
=== Used programs ===&lt;br /&gt;
*ping&lt;br /&gt;
*write&lt;br /&gt;
*mail&lt;br /&gt;
*sleep&lt;br /&gt;
=== Getting started ===&lt;br /&gt;
Use the ''man'' pages for ping, write and mail.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[heth@bkshost bin]$ man ping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Experiment with the commands until you know how they work. And make them work for you.&amp;lt;br/&amp;gt;&lt;br /&gt;
To test if [[ping]] failed or succeded you can use if&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ping -c 1 192.168.142.1 &amp;gt;/dev/null&lt;br /&gt;
  then echo &amp;quot;Ping succeded.&amp;quot;&lt;br /&gt;
  else echo &amp;quot;Ping Failed.&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Astifl</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=UNIX_assignments&amp;diff=1013</id>
		<title>UNIX assignments</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=UNIX_assignments&amp;diff=1013"/>
				<updated>2009-02-12T14:46:55Z</updated>
		
		<summary type="html">&lt;p&gt;Astifl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Linux]][[Category:UNIX]]&lt;br /&gt;
== Network management with ping ==&lt;br /&gt;
Write a bash script that will ping 192.168.142.1, mars.tekkom.dk, 172.16.4.77 '''once''' every minute. If it fails three times in a row (Three minutes) it should write to your terminal and send a mail to you. You have to be logged in twice. &lt;br /&gt;
*One session where you run your program&lt;br /&gt;
*Another session where you will receive your messages and read your mail&lt;br /&gt;
=== Used programs ===&lt;br /&gt;
*ping&lt;br /&gt;
*write&lt;br /&gt;
*mail&lt;br /&gt;
*sleep&lt;br /&gt;
=== Getting started ===&lt;br /&gt;
Use the ''man'' pages for ping, write and mail.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[heth@bkshost bin]$ man ping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Experiment with the commands until you know how they work. And make them work for you.&amp;lt;br/&amp;gt;&lt;br /&gt;
To test if [[ping]] failed or succeded you can use if&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ping -c 1 192.168.142.1 &amp;gt;/dev/null&lt;br /&gt;
  then echo &amp;quot;Ping succeded.&amp;quot;&lt;br /&gt;
  else echo &amp;quot;Ping Failed.&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Astifl</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=UNIX_assignments&amp;diff=1012</id>
		<title>UNIX assignments</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=UNIX_assignments&amp;diff=1012"/>
				<updated>2009-02-12T14:16:37Z</updated>
		
		<summary type="html">&lt;p&gt;Astifl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Linux]][[Category:UNIX]]&lt;br /&gt;
== Network management with ping ==&lt;br /&gt;
Write a bash script that will ping 192.168.142.1, mars.tekkom.dk, 172.16.4.77 '''once''' every minut. If it fails three times in a row (Three minutes) it should write to your terminal and send a mail to you. You have to be logged in twice. &lt;br /&gt;
*One session where you run your program&lt;br /&gt;
*Another session where you will receive your messages and read your mail&lt;br /&gt;
=== Used programs ===&lt;br /&gt;
*ping&lt;br /&gt;
*write&lt;br /&gt;
*mail&lt;br /&gt;
*sleep&lt;br /&gt;
=== Getting started ===&lt;br /&gt;
Use the ''man'' pages for ping, write and mail.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[heth@bkshost bin]$ man ping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Experiment with the commands until you know how they work. And make them work for you.&amp;lt;br/&amp;gt;&lt;br /&gt;
To test if [[ping]] failed or succeded you can use if&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if ping -c 1 192.168.142.1 &amp;gt;/dev/null&lt;br /&gt;
  then echo &amp;quot;Ping succeded.&amp;quot;&lt;br /&gt;
  else echo &amp;quot;Ping Failed.&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Astifl</name></author>	</entry>

	</feed>