eliminating text with sed?
Hello,
I have a document and I am trying to remove the square brackets and everything between square brackets. I think I should be able to do this with sed but I can't seem to figure it out... using Linux bash the text looks like this: effective connectivity structural equation modeling [McIntosh et al., 1994] and dynamic causal modeling [Friston et al., 2003] have and I would like to remove the [ ] and everything in between to give: effective connectivity structural equation modeling and dynamic causal modeling have Any help would be greatly appreciated! |
Show us what you've tried and what happened. Sed is designed to do things just like that - metea-characters can need some care though.
|
Here you go:
Code:
sed 's:\s*\[[^]]*\]\s*: :g' |
All times are GMT -5. The time now is 07:11 AM. |