- 1 Enterprise Unix Roundup: Is 'Choice' a Dirty Word for Enterprise Desktops?
- 2 Enterprise Unix Roundup: The Linux World's Newest Big Wheel
- 3 Enterprise Unix Roundup: Is Amiga Ready for the Enterprise?
- 4 Enterprise Unix Roundup: Is Amiga Ready for the Enterprise?
- 5 Enterprise Unix Roundup: Index of Articles
- 1 Vapor IO Brings OpenDCRE to General Availability
- 2 VMware Takes the Wraps Off vRealize Automation and vRealize Business
- 3 Microsoft Previews Hyper-V Containers for Windows Server 2016
- 4 Mirantis Led FUEL Project Gets Installed Under OpenStack Big Tent
- 5 Red Hat Enterprise Linux 7.2 Adds Security, DR Features
Enterprise Unix Roundup: Back in the Closet With the Cape Page 2
|Main||In Other News||Security Roundup||Tips of the Trade|
TurboLinux patched an Apache vulnerability that, harkening back to the days of ANSI bombs, could allow escape sequences in Apache's logs to cause terminals to execute malicious code.
Tips of the Trade
We're not ordinarily fond of posting tips that are limited to a single platform, but we are fond of tips that make the command line feel a little closer to our fingertips, even when we're working in a graphical environment. So this week's tip points at the Macintosh text editor BBEdit, which has a feature we'd never explored until we stumbled across it accidentally: shell worksheets. They work like this:
You open a new file using the File->New->Shell Worksheet menu. The first time you do this (and until you remove a file from the BBEdit installation directory), you'll see a lot of text starting with the advisory "YOU ARE NOT RUNNING A TERMINAL EMULATOR." What you are running is a worksheet file. You can type out a shell command (one that returns immediately, such as ls, but not a command like top) and press the Apple and Return keys at the same time. The output of that command appears in the worksheet. The sample worksheet provided with BBEdit offers plenty of other examples to get you started.
So what makes this better than a plain old terminal emulator?
The same things that make a spreadsheet sometimes better than bc: Although there are facilities in the average Unix shell for re-using typed-in commands (such as hitting ctrl-R to search your command history), sometimes it's nice to have your work in a more navigable environment, especially if you're trying to work through a particularly tricky pipe or regexp challenge and could use niceties like bracket matching and syntax highlighting.
If you're interested in entering more than one line (e.g., piping a paragraph worth of text in your worksheet), you can highlight the entire block of text as well as the command to pipe it through; then press Apple-Return.
cat somefileaboutsuse.txt |sed s/[Ss][Uu][Ss][Ee]/SUSE/g
What's that? Our heads were spinning from the many ways people are capitalizing "SUSE" these days (probably because it was "SuSE" until shortly before Novell bought the company), so we decided to can a bit of sed that will help us if we slip before our fingers know better.
Remember, regular expressions are your friend.