Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.




Perl script to find missing and move to desire folder

  • Public
By Neel 2474 days ago
#!/usr/bin/perl -w use strict; use warnings; open(my $ids, "<", "$ARGV[0]") or die "Can't open input.txt: $!"; while (<$ids>) { chomp; next if $_ =~ /^\s*$/; my $id = $_; open(my $val, "<", "$ARGV[1]") or die "Can't open input.txt: $!"; while (<$val>) { chomp; if (/$id/) { print "found string $id\n"; system ("cp $_ 2move"); } } }