I've been fiddling with this for a while now and can't seem to figure it out. What I'm trying to do is replace all numbers in a file with a single #.
Sounds simple, and it should be, but I can't get my head around it. Any help would be appreciated.
What I've got so far (but doesn't work) is:
echo "fdsafdsa 32432 dsafdas" | sed 's/[0-9]+/#/g'
The output I expect is:
fdsafdsa # dsafdas
But sed gives me the same string with nothing replaced.