paste -d ' ' test <(python -c "for n in range($(wc -l test | grep -oE '[0-9]+')): print 'is a file' ") | mate
/usr/bin/BuildStrings is a file
/usr/bin/CpMac is a file
/usr/bin/DeRez is a file
/usr/bin/GetFileInfo is a file
/usr/bin/IPMITool is a file
/usr/bin/ImageUnitAnalyzer is a file
...
On my system, this has 3752 lines. Say now that I have it open, I want to change this into just the list of executable names: BuildStrings, CpMac, etc. The best way to do this would probably be to do a find-and-replace; that's really easy, in fact. But it's not the first thing that popped into my head. Instead, I tried to do it like this:
- Rectangular-select the /usr/bin/ part on every line and delete it. That worked fine.
- Select every line (command-A) and go into edit-each-line mode, to delete the "is a file" part. I can go into the edit mode okay, but as soon as I hit backspace, TextMate becomes unresponsive, its memory usage skyrockets, and basically nothing happens until I kill it.
Is this a known problem? Why is edit-each-line mode so memory-intensive? It's not a major issue, since the workaround is in fact easier than this way of doing it, but still....
(Why was I trying to do this in the first place? Well, my file looked like:
...
and I wanted to get the list of emails out.)