I want to add parenthesis to all words I used
sed \'s/[a-z]*/(&)/g\'
inputfile.txt
hola crayola123456
abc123456
>
Two errors:
* means 0 or more matches, you need at least one match, then +;sed (OSX version) uses basic regexp by default (so + isn't available), you should activate extended regexp syntax with option -E.Then:
echo "hola abc1234 foo12 bar" | sed -E 's/[a-z]+/(&)/g'
produces:
(hola) (abc)1234 (foo)12 (bar)