osx - One empty dummy-file copied and saved with names from a list -


i'm trying in osx terminal: have list (test.txt) containing around 700 unique file names. these unique file names needs saved one-by-one 1 empty image file ( eg. 700 x 1225 px). have created empty file name empty.jpg. have read pbcopy , pbpaste can't figure how work these commands! thinking list (test.txt) , image (empty.jpg) schould in same folder , output saved in location. can newbie @ …?

i found solution on issue using perl script running in terminal:

#!/usr/bin/perl  use strict; use warnings; use file::copy;  $filetobecopied = "empty.jpg";  $filename = 'test.txt'; open(my $fh, '<:encoding(utf-8)', $filename) or die "could not open file '$filename' $!";  while (my $row = <$fh>) { chomp $row; print "$row\n"; copy($filetobecopied, $row) or die "file cannot copied."; } 

works expected!


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -