I want to convert below input file (abc) to output file (xyz) as below:
$more abc "2005057400BPI","TS.1.BPI.20121112120000.000#S10S#.txt.xml" "2005057408BPI","TS.1.BPI.20121112120000.000#S10S#.txt.xml" "2005057488BPI","TS.1.BPI.20121112120000.000#S10S#.txt.xml" $more xyz "2005057400BPI",TS.1.BPI.20121112120000.000.txt "2005057408BPI",TS.1.BPI.20121112120000.000.txt "2005057488BPI",TS.1.BPI.20121112120000.000.txt
The abc file contains aorund 35k lines. I am doing the conversion as:
$perl -pi -e 's/"//g' abc $cut -d'.' -f1-5 abc > xyz $perl -pi -e 's/.....$/\.txt/g' xyz $perl -pi -e 's/#//g' xyz $perl -pi -e 's/^/"/g' xyz $perl -pi -e 's/,/",/g' xyz
Is there any other way to do this faster with fewer teams.
source share