Hello,
I try to manipulate a text file. In this case, I try to comment the third row
structure of my text file
I tried several regex variations but it doesnt work. I used [:space:], [ \t] and other expressions
what am I doing wrong?
I try to manipulate a text file. In this case, I try to comment the third row
structure of my text file
Code:
# line like this
text tab or blank text again
# should looks so
word word2 after tab or blank #word3 again after tab or blanks
I tried several regex variations but it doesnt work. I used [:space:], [ \t] and other expressions
Code:
sed -e 's/^\([a-z]+\)[[:space:]]+\([a-z]+\)[ \t]+/\1\2#\3/g' sedfile
what am I doing wrong?