I have a file with ^A
as a delimiter:
8bf9f1897035297fb7b0767e4e5e191b2c93ceb^AAustralia^A2016-01-13 05:19:06^A
8bf9f1897035297fb7b0767e4e5e191b2c93ceb^AAustralia^A2016-01-13 05:19:06^A
8bf9f1897035297fb7b0767e4e5e191b2c93ceb^AAustralia^A2016-01-13 05:19:06^A
How can I replace the delimiters with |
using awk or sed?
Desired output:
8bf9f1897035297fb7b0767e4e5e191b2c93ceb|Australia|2016-01-13 05:19:06|
8bf9f1897035297fb7b0767e4e5e191b2c93ceb|Australia|2016-01-13 05:19:06|
8bf9f1897035297fb7b0767e4e5e191b2c93ceb|Australia|2016-01-13 05:19:06|
If you are referring to the control-A character:
sed 's/\x01/|/g'
tr '\001' '|'
If you are referring to the two-character sequence ^A
:
sed 's/\^A/|/g'
gsub( /\^A/,"|" )
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments