Skip to content

Instantly share code, notes, and snippets.

@JEEN
Created October 10, 2016 06:58
Show Gist options
  • Save JEEN/a9a2df86b13d4c5d88d386926b40826b to your computer and use it in GitHub Desktop.
Save JEEN/a9a2df86b13d4c5d88d386926b40826b to your computer and use it in GitHub Desktop.
move_all.pl
use strict;
use warnings;
use File::Copy;
open my $fh, "<", $ARGV[0] or die $!;
while(<$fh>) {
s/[\r\n]//g;
my ($col1, $col2) = split "\t", $_;
$col2 =~ s/[^a-zA-Z0-9-_]/_/g;
move($col1, $col2);
}
@JEEN
Copy link
Author

JEEN commented Oct 10, 2016

$ perl move_all.pl AAAA.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment