<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.ixheim.de/index.php?action=history&amp;feed=atom&amp;title=Pw-gen-bash-function</id>
	<title>Pw-gen-bash-function - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ixheim.de/index.php?action=history&amp;feed=atom&amp;title=Pw-gen-bash-function"/>
	<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Pw-gen-bash-function&amp;action=history"/>
	<updated>2026-06-29T02:41:43Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Xinux Wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.ixheim.de/index.php?title=Pw-gen-bash-function&amp;diff=45857&amp;oldid=prev</id>
		<title>Thomas.will: Die Seite wurde neu angelegt: „ &lt;syntaxhighlight lang=bash&gt; #!/bin/bash  generate_password() {   local length=$1   local characters='!@#$%^&amp;*()_-+=~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP…“</title>
		<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Pw-gen-bash-function&amp;diff=45857&amp;oldid=prev"/>
		<updated>2023-06-07T13:21:45Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „ &amp;lt;syntaxhighlight lang=bash&amp;gt; #!/bin/bash  generate_password() {   local length=$1   local characters=&amp;#039;!@#$%^&amp;amp;*()_-+=~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
generate_password() {&lt;br /&gt;
  local length=$1&lt;br /&gt;
  local characters='!@#$%^&amp;amp;*()_-+=~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'&lt;br /&gt;
  local password=''&lt;br /&gt;
&lt;br /&gt;
  for ((i=0; i&amp;lt;$length; i++))&lt;br /&gt;
  do&lt;br /&gt;
    local random_index=$((RANDOM % ${#characters}))&lt;br /&gt;
    password+=${characters:$random_index:1}&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
  echo &amp;quot;$password&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Überprüfung, ob die Anzahl der Stellen als Parameter übergeben wurde&lt;br /&gt;
if [ $# -eq 0 ]; then&lt;br /&gt;
  echo &amp;quot;Bitte geben Sie die Anzahl der Stellen als Parameter an.&amp;quot;&lt;br /&gt;
  exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Generiere das Passwort mit der angegebenen Anzahl der Stellen&lt;br /&gt;
password=$(generate_password $1)&lt;br /&gt;
echo &amp;quot;Das generierte Passwort lautet: $password&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Thomas.will</name></author>
	</entry>
</feed>