-1
marcmoose-lint unimarc.rules marc.iso
perl -ne 'if (/^([0-9]{3})[()0-9]*: *(.*)$/) { print "$1: $2\n";}' marc.iso.log | sort | uniq -c
perl script1.pl
perl script2.pl filename.txt
perl script3.pl

I have tried the following, no luck: wrapper.pl script:

my $command = "perl s1.pl in.fa > out1.txt";
system($command);

$command = "perl s2.pl out1.txt > out2.txt";
system($command);

$command = "perl s3.pl out2.txt > out3.txt";
system($command);

How could i make all the above scripts

marcmoose-lint unimarc.rules marc.iso
    perl -ne 'if (/^([0-9]{3})[()0-9]*: *(.*)$/) { print "$1: $2\n";}' marc.iso.log | sort | uniq -c
    perl script1.pl
    perl script2.pl filename.txt
    perl script3.pl

be inserted into a single executable script, ie run.sh?

  • 2
    Showing a bunch of code that doesn't work the way you want doesn't exactly tell us your actual intent. A [mcve] would be far more useful. At minimum, we need to (1) know what you want, (2) know what you're getting instead, and (3) have everything we need to test whether an answer resolves that. – Charles Duffy Apr 24 '18 at 13:42
  • which is the target language perl or bash ? if it's bash it's trivial just copy the commands in script – Nahuel Fouilleul Apr 24 '18 at 13:46
  • i would appreciate both, but any of the two can do –  Apr 24 '18 at 13:47
  • otherwise [call a perl script from another](https://stackoverflow.com/questions/364842/how-do-i-run-a-perl-script-from-within-a-perl-script) – Nahuel Fouilleul Apr 24 '18 at 13:50
  • i made a bash script that worked, it was trivial thank you –  Apr 24 '18 at 13:57

1 Answers1

1
use autodie qw( system );

system(q{marcmoose-lint unimarc.rules marc.iso});
system(q{perl -ne 'if (/^([0-9]{3})[()0-9]*: *(.*)$/) { print "$1: $2\n";}' marc.iso.log | sort | uniq -c});
system(q{perl script1.pl});
system(q{perl script2.pl filename.txt});
system(q{perl script3.pl});
ikegami
  • 367,544
  • 15
  • 269
  • 518