Reputation: 17
I have a csv file with below values, I am trying to replace the value "^@" using SED command but getting error message "Pattern not found".
Value:
^@#uiuiuiui^@
^@#uiuiuiui^@
^@#uiuiuiui^@
^@#uiuiuiui^@
^@#uiuiuiui^@
Attempt:
sed 's/^@/$/g' file.csv
Upvotes: 0
Views: 41
Reputation: 8611
You have to backslash the ^
char. In a regular expression, it means "starts with". It is an operator. Since you want to explicitly replace it, backslash it.
So:
sed 's/\^@/$/g' file.csv
Upvotes: 1