diff options
author | Håkon Solbjørg <hlsolbjorg@gmail.com> | 2019-04-01 22:27:39 +0200 |
---|---|---|
committer | Håkon Solbjørg <hlsolbjorg@gmail.com> | 2019-04-02 19:56:01 +0200 |
commit | 8dac5e5615dfa2ef581cc590e4f452893ccb57f9 (patch) | |
tree | 2329fea6354cd01c3eec542dd8186c80fb7917db /old/cable_labels.pl | |
parent | ebc46097a683a81fd9c2ad5dc3618f3f2ad17440 (diff) |
chore: Add old scripts ☠️
Diffstat (limited to 'old/cable_labels.pl')
-rw-r--r-- | old/cable_labels.pl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/old/cable_labels.pl b/old/cable_labels.pl new file mode 100644 index 0000000..b461d03 --- /dev/null +++ b/old/cable_labels.pl @@ -0,0 +1,16 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +my ($rows, $switches, $cables) = @ARGV; + +for my $row (1 .. $rows) { + next if (!($row & 1)); + + for my $switch (1 .. $switches) { + for my $cable (1 .. $cables) { + print join('-', ($row, $switch, $cable)) . ';' . "\n"; + } + } +} |