Reputation
6,699
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
16 44
Newest
 Necromancer
Impact
~355k people reached

Mar
25
comment How to find and replace a field column value in UNIX
@StephaneChazelas: Interesting, this seems to be because of overlapping matches. It can be fixed by looping, as you have already found.
Mar
25
comment How to find and replace a field column value in UNIX
@StephaneChazelas: good point, I added a terminal anchor as well, thanks.
Mar
25
revised How to find and replace a field column value in UNIX
Handle elements like |123-abc|
Mar
25
comment How to find and replace a field column value in UNIX
@MeghanaPrakash: This was tested with GNU sed. Which version of sed are you using?
Mar
25
revised How to find and replace a field column value in UNIX
Keep only GNU answer until a posix sed is available
Mar
25
reviewed Approve How to find and replace a field column value in UNIX
Mar
25
answered How to find and replace a field column value in UNIX
Mar
21
reviewed Approve sed tag wiki
Mar
20
awarded  Nice Answer
Mar
11
reviewed Approve Kernel /proc ipv6 settings precedence
Feb
26
reviewed Approve Is it possible to use variables in count braces in Bash?
Jan
29
revised print parent directories full path of find output
edited body
Jan
29
revised print parent directories full path of find output
deleted 2 characters in body
Jan
29
answered print parent directories full path of find output
Dec
9
revised How to cut (select) a field from text line counting from the end?
deleted 14 characters in body
Nov
10
reviewed Approve how to emulate “replace a b b a” with a sed?
Nov
8
comment Is it possible to get a hardcopy in Tmux?
@Moondoggy: The semi-colons should indeed be escaped, thanks.
Nov
8
revised Is it possible to get a hardcopy in Tmux?
More consistent and clear example and text
Oct
17
comment With grep, how can I match a pattern and invert match another pattern?
@RahulPatil: I see what you mean now, Option 1 assumes that a --\n delimiter is between each matched group, which is not there if the groups are adjacent to each other. How adjacent groups should be handled is task-specific, so this is not necessarily wrong. Option 2 does not depend on the separator and is not affected.
Oct
17
comment With grep, how can I match a pattern and invert match another pattern?
@RahulPatil: could you rephrase or add more detail to your question? I don't understand what you are asking.