Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
While the Subject line says BASH, I'm not averse to other scripting solutions (awk, perl, etc.).
Years ago, I was greatly impressed by Extensis Portfolio's innate ability to alphabetically sort keywords and supplemental categories added to those picture file types that supported IPTC and XMP metadata. I have yet to find another application, GUI or CLI, that does this in any OS on any hardware platform, and I've been searching off and on since 1996.
In the meantime, I've "taken the job in hand" to do my own descriptive metadata writing alphabetically. Here's where I've run into a problem. I don't always think alphabetically when describing a picture I wish to add keywords and supplemental categories to, and rearranging by hand can get tedious; even when it's not, it's somewhat time-consuming.
I've also encountered situations where, when adding a new key or supplemental to a picture's metadata, most GUI apps attach it to the end of the set, which means more editing on my part.
To make quick work of this editing is what I'm after. The best I've come up with in BASH shell is
Except for the trailing comma, I'd be satisfied. Call it petty, but a few months back, I rewrote three or four BASH scripts in such a way that a trailing comma was made part of the text, instead of being seen as a delimiter. I suppose editing out one comma takes far less time than rearranging whole strings of words, but frankly, I'd rather not have to.
As I mentioned before, I'm not married to, or insistent on, a BASH solution.
Looking forward to any help on this plane,
Last edited by SilversleevesX; 11-29-2011 at 12:21 PM.
Reason: Two strings did not match for content