Reputation: 13
I have a sample file like this
001|"Arab"|hjgjk
002|"HGJ"|dkflj
i need the output like
001|Arab|hjgjk
002|HGJ|dkflj
i have tried below code
perl -pi -e 's/\"//g' file1 > file2
Please help
Upvotes: 0
Views: 61
Reputation: 13
We need to give something like
perl -p -e 's/"^""//g' file1 > file2
if we are working on Windows, because "^" is the escape sequence for " in Windows.
Upvotes: 0
Reputation: 93735
If you are using the -i
that means "in place", and so you don't need to redirect the output. Either do this:
perl -pi -e 's/\"//g' file1
or this:
perl -p -e 's/\"//g' file1 > file2
But don't combine -i and redirection.
Upvotes: 1