64 reputation
4
bio website metropho.rs
location
age
visits member for 2 years, 4 months
seen Jul 9 at 16:32

Nov
6
accepted Print/Tee to console without passing output to pipe
Nov
6
comment Print/Tee to console without passing output to pipe
This is pretty much what I ended up going with. I got the same thing for handling spaces by wrapping the array in quotes when its being read. Thanks!
Nov
5
comment Print/Tee to console without passing output to pipe
@Stephane Sure. Well maybe. The consequence here being that the message will be printed every time the function is called?
Nov
5
revised Print/Tee to console without passing output to pipe
added clarification about muliline inputs and where the comments should appear
Nov
5
comment Print/Tee to console without passing output to pipe
Sorry for the comment spam. I think I found out my problem though. I've added another example in the question.
Oct
28
asked Print/Tee to console without passing output to pipe
Oct
24
awarded  Editor
Oct
24
revised Replace text between brackets
added clarification about word boundaries
Oct
24
comment Replace text between brackets
Thanks! That did it. @choroba and @Guru word boundary would have been great too, but I want to be robust in what text the SOMETHING should be. I'll update the question to make that clearer.
Oct
24
accepted Replace text between brackets
Oct
24
asked Replace text between brackets
Apr
27
awarded  Supporter
Apr
27
accepted Sort fields inline
Apr
27
asked Sort fields inline
Apr
23
awarded  Scholar
Apr
23
comment Delete repeated words between brackets inline
I ended up going with sed -e ': a' -e 's/\(\[[^][]*\)\([A-Z][A-Z][A-Z]\)\([^][]*\)\2/\1\2\3/' -e 't a' since the wild card seemed to be only deleting the last two letters of a repeat. I changed other code to ensure that all the matches would be three characters long. Thanks!
Apr
23
accepted Delete repeated words between brackets inline
Apr
18
awarded  Student
Apr
18
comment Delete repeated words between brackets inline
@ams Actually yes: it'd be GBP, CDN or PS in every case. I really want the output brackets to give me the unique set of that dictionary that appears within the input brackets, ignoring white space. If the brackets have GBP multiple times, regardless of separation I want it condensed to a single GBP. I wish I could do something like tr -s "GBP" |tr -s "CDN"|tr -s "PS" but tr -s only works for single characters.
Apr
18
asked Delete repeated words between brackets inline