Created
December 11, 2019 09:38
-
-
Save ujaehrig/977ccba2265b52793d5a71584b6e210c to your computer and use it in GitHub Desktop.
Remove leading and trailing quote, replace common escapes with their unescaped counterpart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use warnings; | |
while(my $line = <STDIN>) { | |
$line =~ s/\\t/\t/g; | |
$line =~ s/\\n/\n/g; | |
$line =~ s/^\"//g; | |
$line =~ s/\"$//g; | |
$line =~ s/\\\"/\"/g; | |
print $line; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment