diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-11 14:59:08 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-11 14:59:08 +0200 |
commit | 684c915f6b33cb0ece892ba4819596a3d394554d (patch) | |
tree | 69b74c6b07e4b7e9e64ab25e60e87a8e1cc0a652 | |
parent | Changes (diff) | |
download | dotfiles-bsd-684c915f6b33cb0ece892ba4819596a3d394554d.tar.gz dotfiles-bsd-684c915f6b33cb0ece892ba4819596a3d394554d.tar.bz2 dotfiles-bsd-684c915f6b33cb0ece892ba4819596a3d394554d.tar.xz dotfiles-bsd-684c915f6b33cb0ece892ba4819596a3d394554d.tar.zst dotfiles-bsd-684c915f6b33cb0ece892ba4819596a3d394554d.zip |
New script to convert file names to UNIX (WIP)
-rwxr-xr-x | .local/bin/unixize | 47 |
1 files changed, 47 insertions, 0 deletions
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__ |