0

I have output file generated from MSSQL table and i am trying to use it in Linux but it seems when i run export data from SQL Server it carries ^@ junk character and it causing issue while import, How we can remove ^@ from text file?

355|1|1|Build an Equipment Dashboard|build-equipment-dashboard|^@|Overview|asdf|

1 Answers1

1
$ echo '355|1|1|Build an Equipment Dashboard|build-equipment-dashboard|^@|Overview|asdf|' | sed -E 's/\^@//'
355|1|1|Build an Equipment Dashboard|build-equipment-dashboard||Overview|asdf|

see man sed ... -E means extended regex. ^ must be escaped with \ .

for a call on a textfile extend the sed-command with the -i option for inplace.

sed -Ei 's/\^@//' yourtextfile
Oliver Gaida
  • 1,722
  • 7
  • 14