Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Change tags for ones that fit the topic, reformat and rephrase the question.
Source Link

I am using the belowfollowing command to replace the non-ASCII characters, single quotes and non printable characters.:

sed -i -e "s/'//g" -e's/'//g' -e's/[\d128-\d255]//g' -e's/\x0//g' filename 

ButHowever, I am getting an error as:

sed: -e expression #3, char 18: Invalid collation character 

Please assist.How can I replace these characters?

I am using the below command to replace the non-ASCII characters, single quotes and non printable characters.

sed -i -e "s/'//g" -e's/'//g' -e's/[\d128-\d255]//g' -e's/\x0//g' filename 

But I am getting error as:

sed: -e expression #3, char 18: Invalid collation character 

Please assist.

I am using the following command to replace the non-ASCII characters, single quotes and non printable characters:

sed -i -e "s/'//g" -e's/'//g' -e's/[\d128-\d255]//g' -e's/\x0//g' filename 

However, I am getting an error:

sed: -e expression #3, char 18: Invalid collation character 

How can I replace these characters?

added 6 characters in body; edited tags
Source Link
Mat
  • 54.9k
  • 11
  • 164
  • 143

I am using the below command to replace the non-ASCII characters, single quotes and non printable characters.

sed -i -e "s/'//g" -e's/'//g' -e's/[\d128-\d255]//g' -e's/\x0//g' filename

sed -i -e "s/'//g" -e's/'//g' -e's/[\d128-\d255]//g' -e's/\x0//g' filename 

But I am getting error as: sed: -e expression #3, char 18: Invalid collation character

sed: -e expression #3, char 18: Invalid collation character 

Please assist.

I am using the below command to replace the non-ASCII characters, single quotes and non printable characters.

sed -i -e "s/'//g" -e's/'//g' -e's/[\d128-\d255]//g' -e's/\x0//g' filename

But I am getting error as: sed: -e expression #3, char 18: Invalid collation character

Please assist.

I am using the below command to replace the non-ASCII characters, single quotes and non printable characters.

sed -i -e "s/'//g" -e's/'//g' -e's/[\d128-\d255]//g' -e's/\x0//g' filename 

But I am getting error as:

sed: -e expression #3, char 18: Invalid collation character 

Please assist.

Source Link
Azhar
  • 11
  • 3
  • 7

Replace non-ASCII characters with space in a file

I am using the below command to replace the non-ASCII characters, single quotes and non printable characters.

sed -i -e "s/'//g" -e's/'//g' -e's/[\d128-\d255]//g' -e's/\x0//g' filename

But I am getting error as: sed: -e expression #3, char 18: Invalid collation character

Please assist.