Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
And what I want to do is extract the words in the second and third fields and write them to two text files so I have a "master" set of keywords and supplemental categories for annotating JPEG files.
This file is about three years old, and I've so far this year gone by finding the keywords I recall having a different Supp. Cat., but drawing these out to separate lists (I had them but things go missing or get deleted after two years) would prove a lot easier.
I'm sure it's a simple matter of using tr or awk or something along those lines, But like a lot of other things with scripting, I've forgotten the syntax of those tools.
I used to have a script that read the items in field 2 (keywords), matched them with the items in field 3 (supplemental categories), dumped them to a temporary text file, sorted them alphabetically reading from that file, then wrote that string to another text file I could sed into the first file after adding ^ as a delimiter. Another script wrote each item in the strings into JPEG files using Exiftool. I still have the last script, and I'd like to rewrite the "match and sort" one if I could. It would make it much easier to annotate picture files like JPEGs whose metadata containers support "keys and cats," as I've always called them.
if you need help or want to discuss any of your scripts please post them (and also try to explain how does that work, what did you try to achieve, what kind of problems you have ...) - here, or in a new thread.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.