Why is SED not accepting my input?
Hi I'm new to unix and trying to make a script that removes punctuation
from user input using SED. But it isn't working.
`read -p "Please enter a word or sentence: " word
sed -n 's/[^a-zA-Z ]//g' $word`
if i enter abcd.,abcd it will give me an error "sed: can't read
abcd,.abcd: No such file or directory"
So I guess that means it is treating the variable $word as a file instead
of a string that I want it to process.
How would I fix this?
No comments:
Post a Comment