<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=Nohvok_Bash_Scripting</id>
		<title>Nohvok Bash Scripting - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=Nohvok_Bash_Scripting"/>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Nohvok_Bash_Scripting&amp;action=history"/>
		<updated>2026-05-14T21:48:02Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.0</generator>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Nohvok_Bash_Scripting&amp;diff=5820&amp;oldid=prev</id>
		<title>Heth: /*  */</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Nohvok_Bash_Scripting&amp;diff=5820&amp;oldid=prev"/>
				<updated>2009-05-15T09:16:11Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 09:16, 15 May 2009&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-l77&quot; &gt;Line 77:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 77:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Skrevet af Morten Fallesen&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Skrevet af Morten Fallesen&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; 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;[[Category:Linux]] [[Category:H2]] [[Category:Bash&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]] [[Category:Scripting&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;[[Category:Linux]] [[Category:H2]] [[Category:Bash]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Heth</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Nohvok_Bash_Scripting&amp;diff=985&amp;oldid=prev</id>
		<title>Nohvok: /*  */</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Nohvok_Bash_Scripting&amp;diff=985&amp;oldid=prev"/>
				<updated>2009-02-12T09:19:09Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 09:19, 12 February 2009&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-l77&quot; &gt;Line 77:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 77:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Skrevet af Morten Fallesen&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Skrevet af Morten Fallesen&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; 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;[[Category:Linux]] [[Category:H2] [Category:Bash] [Category:Scripting]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;[[Category:Linux]] [[Category:H2]&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] [&lt;/ins&gt;[Category:Bash]&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] [&lt;/ins&gt;[Category:Scripting]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nohvok</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=Nohvok_Bash_Scripting&amp;diff=984&amp;oldid=prev</id>
		<title>Nohvok: New page: == Bash Scripting == === Lidt ekspempler på Scripts === ==== Greetings ==== &lt;source lang=&quot;bash&quot;&gt; #!/bin/bash #Uncomment HOUR=`date +%H` when using for real #HOUR=`date +%H` # #HOUR=$1 onl...</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=Nohvok_Bash_Scripting&amp;diff=984&amp;oldid=prev"/>
				<updated>2009-02-12T09:18:29Z</updated>
		
		<summary type="html">&lt;p&gt;New page: == Bash Scripting == === Lidt ekspempler på Scripts === ==== Greetings ==== &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; #!/bin/bash #Uncomment HOUR=`date +%H` when using for real #HOUR=`date +%H` # #HOUR=$1 onl...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Bash Scripting ==&lt;br /&gt;
=== Lidt ekspempler på Scripts ===&lt;br /&gt;
==== Greetings ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#Uncomment HOUR=`date +%H` when using for real&lt;br /&gt;
#HOUR=`date +%H`&lt;br /&gt;
#&lt;br /&gt;
#HOUR=$1 only for testing purposes.....&lt;br /&gt;
HOUR=$1&lt;br /&gt;
if test $HOUR -le 7&lt;br /&gt;
  then&lt;br /&gt;
    echo &amp;quot;You are early go home&amp;quot;&lt;br /&gt;
  else if test $HOUR -le 8&lt;br /&gt;
         then&lt;br /&gt;
           echo &amp;quot;You are early&amp;quot;&lt;br /&gt;
         else if test $HOUR -lt 12&lt;br /&gt;
                then&lt;br /&gt;
                  echo &amp;quot;Good morning, Vietnam&amp;quot;&lt;br /&gt;
                else if test $HOUR -lt 16&lt;br /&gt;
                       then&lt;br /&gt;
                         echo &amp;quot;Good evening&amp;quot;&lt;br /&gt;
                     fi&lt;br /&gt;
              fi&lt;br /&gt;
       fi&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== while ===&lt;br /&gt;
==== count example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
COU=1&lt;br /&gt;
while test $COU -lt 10000&lt;br /&gt;
do&lt;br /&gt;
  echo -en &amp;quot;COU = $COU\r&amp;quot;&lt;br /&gt;
  COU=`expr $COU + 1`&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== case ===&lt;br /&gt;
==== secret password example ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# Read the username from the terminal&lt;br /&gt;
echo -en &amp;quot;Enter username: &amp;quot;&lt;br /&gt;
read USERNAME&lt;br /&gt;
# Read the password from the terminal not echoing the characters&lt;br /&gt;
echo -en &amp;quot;Enter password: &amp;quot;&lt;br /&gt;
stty -echo&lt;br /&gt;
read PASSWORD&lt;br /&gt;
stty echo&lt;br /&gt;
# Find the username in the case and check password&lt;br /&gt;
case $USERNAME in&lt;br /&gt;
  john|John) if test $PASSWORD = &amp;quot;banana&amp;quot;&lt;br /&gt;
               then&lt;br /&gt;
                echo &amp;quot;Access granted&amp;quot;&lt;br /&gt;
               else&lt;br /&gt;
                echo &amp;quot;Access denied....&amp;quot;&lt;br /&gt;
                exit&lt;br /&gt;
             fi&lt;br /&gt;
           ;;&lt;br /&gt;
  eve|Eve) if test $PASSWORD = &amp;quot;apple&amp;quot;&lt;br /&gt;
               then&lt;br /&gt;
                echo &amp;quot;Access granted&amp;quot;&lt;br /&gt;
               else&lt;br /&gt;
                echo &amp;quot;Access denied....&amp;quot;&lt;br /&gt;
                exit&lt;br /&gt;
             fi&lt;br /&gt;
           ;;&lt;br /&gt;
  *)       echo &amp;quot;Access denied....&amp;quot;&lt;br /&gt;
           exit&lt;br /&gt;
           ;;&lt;br /&gt;
esac&lt;br /&gt;
echo &amp;quot;The secret information is 198273&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ==&lt;br /&gt;
Skrevet af Morten Fallesen&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux]] [[Category:H2] [Category:Bash] [Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Nohvok</name></author>	</entry>

	</feed>