<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=Rewrite_users.pl</id>
	<title>Rewrite users.pl - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=Rewrite_users.pl"/>
	<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Rewrite_users.pl&amp;action=history"/>
	<updated>2026-04-04T13:19:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://performiq.com/kb/index.php?title=Rewrite_users.pl&amp;diff=2169&amp;oldid=prev</id>
		<title>PeterHarding: New page: &lt;pre&gt; #!/usr/bin/env perl # #  $Id:$ # #-------------------------------------------------  @types = (&#039;backline&#039;, &#039;frontline&#039;, &#039;teamlead&#039;, &#039;operations&#039;); @nodes = (&#039;node1&#039;, &#039;node2&#039;, &#039;node3&#039;...</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=Rewrite_users.pl&amp;diff=2169&amp;oldid=prev"/>
		<updated>2008-05-24T07:36:17Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;lt;pre&amp;gt; #!/usr/bin/env perl # #  $Id:$ # #-------------------------------------------------  @types = (&amp;#039;backline&amp;#039;, &amp;#039;frontline&amp;#039;, &amp;#039;teamlead&amp;#039;, &amp;#039;operations&amp;#039;); @nodes = (&amp;#039;node1&amp;#039;, &amp;#039;node2&amp;#039;, &amp;#039;node3&amp;#039;...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/env perl&lt;br /&gt;
#&lt;br /&gt;
#  $Id:$&lt;br /&gt;
#&lt;br /&gt;
#-------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
@types = (&amp;#039;backline&amp;#039;, &amp;#039;frontline&amp;#039;, &amp;#039;teamlead&amp;#039;, &amp;#039;operations&amp;#039;);&lt;br /&gt;
@nodes = (&amp;#039;node1&amp;#039;, &amp;#039;node2&amp;#039;, &amp;#039;node3&amp;#039;, &amp;#039;node6&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
$no_nodes = $#nodes + 1;&lt;br /&gt;
&lt;br /&gt;
printf &amp;quot;Building data for %d  nodes\n&amp;quot;, $no_nodes;&lt;br /&gt;
&lt;br /&gt;
#---- Rewrite ------------------------------------&lt;br /&gt;
&lt;br /&gt;
foreach $type (@types) {&lt;br /&gt;
   $in  = sprintf(&amp;quot;users_%s_node1.dat&amp;quot;, $type);&lt;br /&gt;
   $out = sprintf(&amp;quot;users_%s_%dnodes.dat&amp;quot;, $type, $no_nodes);&lt;br /&gt;
&lt;br /&gt;
   open IN,  &amp;quot;&amp;lt; $in&amp;quot;;&lt;br /&gt;
   open OUT, &amp;quot;&amp;gt; $out&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
   $_ = &amp;lt;IN&amp;gt;;&lt;br /&gt;
   print OUT $_;&lt;br /&gt;
&lt;br /&gt;
   $cnt = 0;&lt;br /&gt;
&lt;br /&gt;
   while (&amp;lt;IN&amp;gt;) {&lt;br /&gt;
      $idx = $cnt % $no_nodes;&lt;br /&gt;
&lt;br /&gt;
      s/node1/$nodes[$idx]/;&lt;br /&gt;
&lt;br /&gt;
      print OUT $_;&lt;br /&gt;
&lt;br /&gt;
      $cnt++;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   close IN;&lt;br /&gt;
   close OUT;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Perl]]&lt;/div&gt;</summary>
		<author><name>PeterHarding</name></author>
	</entry>
</feed>