We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
'Sed' command #4
'Sed' command #4
+ 0 comments why does this work? wtf
sed -e 's/([0-9]){4}/****/g2'
+ 0 comments sed -E 's/[0-9]{4} /**** /g' Try this
+ 0 comments sed -E "s/([0-9]{4} ){3}/** ** **** /g" expl: ([0-9]{4}) tells sed that find group of 4 digits and {3} tells no of groups , so we are capturing 3 groups of 4-digits and replaces them with *
+ 0 comments ^ -> from the start
cat | sed 's/^............../**** **** ****/'
+ 0 comments I used awk
awk '{$1="****"; $2="****"; $3="****"; print $1, $2, $3, $4}'
if someone can tell me how to use sed I'm beginner
Load more conversations
Sort 106 Discussions, By:
Please Login in order to post a comment