I am kind of new to Linux commands. Recently I got a big files of strings(4GB) The file format look like this.
1,2,http://*.example.org/
1,3,https://*.example.org/
1,4,https://*.example.org/*
1,5,https://example.org/*example
I want to find and replace every asterisk which only at the beginning of the line. The result I want, for example:
1,2,http://replaced.example.org/
1,3,https://replaced.example.org/
1,4,https://replaced.example.org/*
1,5,https://example.org/*example
What I have tried will replace every first occurence. Is there anyway I can do to get the result above ?
sed 's/*/replaced/' inputfile > outputfile