I want to replace a string with wildcard but it doesn’t work.
The string looks like “some-string-8”
I wrote
sed -i 's/string-*/string-0/g' file.txt
but the output is
some-string-08
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The asterisk (*) means “zero or more of the previous item”.
If you want to match any single character use
If you want to match any string (i.e. any single character zero or more times) use