5 ms·
On a personal note, it doesn't require a compiler and doable on any barebones Linux box. Of course, this assumes that setup conditions as described are satisfie
by metaphor 9y ago
On a personal note, it doesn't require a compiler and doable on any barebones Linux box. Of course, this assumes that setup conditions as described are satisfied.
The non-artistic remark is subjective--I'm imagining those with a strong inclination towards regular expressions should find this fairly straight forward.
- peterburkimsher 9y agoI write a lot of scrapers and parsers, and sed is great because it's fast and almost always pre-installed. There's a script I use every day that takes the current date as an integer, calculates an offset, reads line of a Bible reading plan e.g. "Acts 19:1-20 Paul in Ephesus", gets the chapter number "Acts 19", and then links me to that file. I use sed to get the text between* the start and ":". I first wrote it in AppleScript on a Mac, but later I wanted to port it to a jailbroken iPhone. awk wasn't there, but sed was. I also used sed for a Mac/Linux cross-platform script that scraped EPG data from MC2XML (information about TV guides). sed was faster than awk. In practice these days I usually just use TextWrangler and find-replace with Regex, instead of writing a script. * If you think you can do textBetween faster - please contribute your own implementation over on Rosetta Code. http://rosettacode.org/wiki/Text_between http://rosettacode.org/wiki/Text_between
- pattisapu 9y agoTextWrangler has now been sunsetted. :-( https://www.barebones.com/products/textwrangler/ https://www.barebones.com/products/textwrangler/
- peterburkimsher 9y agoI know :( I don't want to pay for BBEdit though, and I'm still on 10.9 so the compatibility hasn't caused problems for me yet.
- Someone 9y agohttps://www.barebones.com/products/bbedit/faqs.html#no_license https://www.barebones.com/products/bbedit/faqs.html#no_licen...: ”Do I have to pay to use BBEdit? No. You can use BBEdit without purchasing a license, in the same way you’ve been using TextWrangler (yes, for free). If you want BBEdit’s complete feature set (web authoring tools, and other exclusive features), you can purchase a license any time you like.” They also claim that gives you more than TextWrangler’s feature set (https://www.barebones.com/products/bbedit/comparison.html https://www.barebones.com/products/bbedit/comparison.html). If they didn’t add nagging for upgrades, it seems they simply renamed TextWrangler to BBEdit.