Replace Strings Using Sed And Regex

前端 未结 6 1909
猫巷女王i
猫巷女王i 2020-12-28 14:57

I\'m trying to uncomment file content using sed but with regex (for example: [0-9]{1,5})

# one two 12
# three four 34
# five six 56

The fol

6条回答
  •  一生所求
    2020-12-28 15:27

    I find it. thanks to all of you

    echo "# one two 12" | grep "[0-9]" | sed 's/# //g'
    

    or

    cat file | grep "[0-9]" | sed 's/# //g'
    

提交回复
热议问题