From 684c915f6b33cb0ece892ba4819596a3d394554d Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 11 Oct 2020 14:59:08 +0200 Subject: New script to convert file names to UNIX (WIP) --- .local/bin/unixize | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 .local/bin/unixize (limited to '.local/bin/unixize') diff --git a/.local/bin/unixize b/.local/bin/unixize new file mode 100755 index 0000000..b9ae293 --- /dev/null +++ b/.local/bin/unixize @@ -0,0 +1,47 @@ +#!/usr/local/bin/perl + +use warnings; +use strict; +use File::Copy; + +sub get_og_files +{ + my @og_files; + my $file; + + opendir(DIR, '.') or die $!; + while ($file = readdir(DIR)) { + next if ($file =~ m/^\./); + push @og_files, $file; + } + closedir(DIR); + return @og_files; +} + +sub get_new_files +{ + my @og_files = @_; + my @new_files; + + push @new_files, @og_files; + foreach (@new_files) { + } + return @new_files; +} + +sub main +{ + my @og_files; + my @new_files; + + @og_files = get_og_files(); + @new_files = get_new_files(@og_files); + foreach (@new_files) { + print "'$_'\n"; + } + return; +} + +main(); + +__END__ -- cgit v1.2.3