1
vote
0answers
40 views

TextAnalysisTool.NET equivalent for OS X

I've used TextAnalysisTool.NET in the past for analyzing log files on Windows machines and found it incredibly useful. I love the simplicity+power that it achieves for dynamically grepping log files, ...
0
votes
2answers
65 views

Merge two separate sed expressions into one?

I'm reading the RealName from dscl for various users. Depending on the user, the output can be one of the following two: RealName: <name> Or: RealName: <name> So I have sed -e ...
1
vote
2answers
70 views

Checking version of Applications installed in ~/Applications with unknown username

I'd like to check the version of Firefox through Apple Remote Desktop of all managed computers. I have written this, but it only checks for Firefox in /Applications /bin/cat ...
1
vote
6answers
1k views

UNIX “find” command, match literal “dot”

I need files ending with ".pdf" or ".png"; here's my attempt: find /Users/robottinosino/Desktop/_PublishMe_ -type f -regex '.*[pdf|png]' this incorrectly includes files ending with "Apdf", "Zpdf", ...
2
votes
2answers
271 views

How to extract terms from an HTML document

I have a HTML document filled with terms that I need to put into a spreadsheet. They follow this basic pattern: <ul> <li class="name"><a ...
1
vote
1answer
1k views

How do I use regular expressions in TextMate's find dialog box to search and replace?

I want to replace all the \caption(.1..) \caption(.2.) \caption(.3..) \caption(.4..) by \caption{} What should I put in the search box?
0
votes
1answer
408 views

Regex editor application for Mac

I'm working with regular expressions on Mac and I'm using: http://reggyapp.com/ But it does not show the exact matches numbered. I'm looking for other applications. Something similar to regex ...
2
votes
2answers
979 views

Textmate: regular expression to replace matches preserving case?

How can I use a single search / replace to replace all words town with village preserving the case of the first letter in this sentence: Towns are small cities. I live in a town.
9
votes
4answers
5k views

Newlines in sed on Mac OS X

I find that \n doesn't work in sed under Mac OS X. Specifically, say I want to break the words separated by a single space into lines: # input foo bar I use, echo "foo bar" | sed 's/ /\n/' But ...
1
vote
1answer
612 views

Is there a command in Mac OS X that can perform multiline regex searching?

I want to do a simple regex search recursively through a directory that isn't restricted to single lines. I tried grep and ack, but neither seem to support this. I know it shouldn't be too ...
0
votes
1answer
293 views

Exclude filetypes in a Textmate project

I know in TextMate I can go to preferences -> advanced -> folder references and play with the regex pattern to remove certain types of files and folders by default. I heard that if you have an ...
0
votes
1answer
292 views

Textmate: Find and replace across project with contents of one file from said project

I have a regular expression to find the text I want (I wrapped the relevant section in custom tags), and I can do it by hand without much issue, but what I want is a way to automatically find and ...
2
votes
2answers
2k views

sed syntax to remove xml

I'm trying to sanitize this output from it's metadata to plug this output into GreekTools, but I am getting stuck on sed. curl --silent www.brainyquote.com | egrep '(span class="body")|(span ...
3
votes
1answer
540 views

In OS X how could I create symlinks to everything within a given directory (rather than the directory itself)?

Say I have a bunch of config files that I'd like to store elsewhere, but if I move them and then symlink the directory, the application sees it as a symlink and won't use the contained files. Instead ...
21
votes
10answers
17k views

Renaming many files in Mac OS X, batch processing

I used to rename file in Linux via a rename command: rename 's/old_pattern/new_pattern/g' *glob Is there something similar in Mac OS X (Snow Leopard)?