-
Notifications
You must be signed in to change notification settings - Fork 2
/
renameFile.pl
26 lines (21 loc) · 679 Bytes
/
renameFile.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl -w
use strict;
use warnings;
# Written by Akram Mohammed
# renameFile.pl
# This program renames the file to proteome_testseq
#ARGUEMENTS------------------------------------------
if ($#ARGV != 0){
print STDERR "-----------------------------------------------------
Please provide the input file name\n
Usage: renameFile.pl <input_file>
-----------------------------------------------------\n";
exit;
}
my $cmd;
my $new_file="../test/proteome_testseq";
open (INFILE, $ARGV[0]) || die "cannot open input file $ARGV[0]: $!";
$cmd = "cp ../test/$ARGV[0] $new_file";
if(system($cmd)) { print "rename failed\n"; }
# close the input and output files.
close INFILE;