More Working with CSV Files from the Command Line
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- A Topic for Discussion - Open Source Feature-Richness?
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Home, My Backup Data Center
- What's the tweeting protocol?
- Readers' Choice Awards
- New Products
- RSS Feeds
- Dart: a New Web Programming Experience
- Reply to comment | Linux Journal
9 hours 1 min ago - Reply to comment | Linux Journal
11 hours 33 min ago - Reply to comment | Linux Journal
12 hours 51 min ago - great post
13 hours 26 min ago - Google Docs
13 hours 48 min ago - Reply to comment | Linux Journal
18 hours 36 min ago - Reply to comment | Linux Journal
19 hours 23 min ago - Web Hosting IQ
20 hours 57 min ago - Thanks for taking the time to
22 hours 34 min ago - Linux is good
1 day 31 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.



Comments
Process Substitution
I've never seen this 'Process Substitution' done before! I just had a quick look at it in the Bash man page. It's something that would've been very used to me in a few occasions over the past few months. Perhaps I haven't heard of it because it's not part of the Posix standard?
Very cool! Thanks for showing us.
Regards,
Matt.
--
Regards,
Matthew Cengia
Useful even if not often used
Not something I use very often, it seems a bit "involved" so it doesn't always occur to me at first, but it is useful.
According to wikipedia ksh, zsh, and rc also support process substitution.
Mitch Frazier is an Associate Editor for Linux Journal.
text
these videos are great. i'd love to be able to follow up and learn for myself.
is there a chance you could post the session text so we could copy/paste/play?
thanks, AB
Good Idea
Here's a shell script that contains the code from this video and the previous one:
#!/bin/bash # Extract emails: # Could also do: grep -i -o '[^,]*@[^,]*' stuff.csv cut -f 3 -d , stuff.csv echo # Use emails to extract lines: for i in $(cut -f 3 -d , stuff.csv | sort --ignore-case | uniq --ignore-case) do grep -i -F "$i" stuff.csv | head -n 1 done echo # Make sure posix mode is OFF so process substitution works "<(...)" syntax. set +o posix # Use emails to de-dupe a file and then extract lines: for i in $(comm -23 \ <(cut -f 3 -d , stuff.csv | sort --ignore-case | uniq --ignore-case) \ <(cut -f 3 -d , nostuff.csv | sort --ignore-case | uniq --ignore-case)) do grep -i -F "$i" stuff.csv | head -n 1 doneHere's stuff.csv:
And nostuff.csv:
Mitch Frazier is an Associate Editor for Linux Journal.
the comm command is great.
the comm command is great. set difference on the command line has always been useful to me. thanks for the example!