"be consistent" | |
PerlMonks |
awk cmd in perlby blur (Initiate) |
on Oct 11, 2018 at 13:21 UTC ( [id://1223868]=perlquestion: print w/replies, xml ) | Need Help?? |
blur has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to write a perl-wrapper of sorts to an existing pipeline
The pipeline uses a few long awk commands that I just want to be printed into a file
(trying to automatically generate the pipeline for new files)
But I cant seem to get perl to see the awk script as just words - it freaks at the symbols
and after spending a long tome trying to backslash everything that might be a problem I am still getting errors...
Any idea how I can get perl to see this line as simple text?
EDIT: Comments about adding script are duely noted This is the awk command in question: awk '{indel=0;for(i=5;i<=NF,i++) {if(i~/REF/){split(i,a,";");split(a[1],b.":");} if(i~/[+-]) {split(a[1],c,":");indel+=c[2]}} print $1"_"$2+1,indel}' > parsed_dataI think that the " and ; symbols are giving perl grief... but I might be wrong I have other awk cmd that I'd need to use and these are much longer (I don't want to backslash twenty symbols... Thanks to everyone for their help! Blur
Back to
Seekers of Perl Wisdom
|
|