Using Awk to beautify grep searches
Recently we’ve seen a sprout of re-implementations of many popular Unix tools. With the expansion of communities built around new languages or platforms, it seems that apart from the novelties in technologies—the ideas on how to use them stay the same. There are more and more solutions to the same kinds of problems:
- text editors
- CSS pre-processors
- find-in-files tools
- screen scraping tools
- … many more …
In this blog post I’d like to tackle the problem from yet another perspective. Instead of resolving to “new and cool” libraries and languages (grep implemented in X language)—I’d like to use what’s out there already in terms of tooling to build a nice search-in-files tool for myself.
Search in files tools
It seems that for many people it’s very important to have a “search in files” tool that they really like. Some of the nice work we’ve seen so far include:
These are certainly very nice. As the goal of this post is to build something out of the tooling found in any minimal Unix-like installation—they won’t work though. They either need to be compiled or require Perl to be installed which isn’t everywhere (e. g. FreeBSD on …
shell
Liquid Galaxy at CES
This past week, End Point attended and exhibited at CES, a global consumer electronics and consumer technology tradeshow that takes place every January in Las Vegas, Nevada. End Point’s Liquid Galaxy was set up in the Gigabyte exhibit at Caesar’s Palace.
Gigabyte invited us to set up a Liquid Galaxy in their exhibit space because they believe the Liquid Galaxy is the best show-piece for their Brix hardware. The Brix, or “Brix GTX Pro” in this case, offers an Intel i7 6th gen processor and NVIDIA GTX950 graphics (for high performance applications, such as gaming) hardware in a small and sleek package (12 in. length, 9 in. width, 1 in. height). Since each Brix GTX Pro offers 4 display outputs, we only needed two Brix to run all 7 screens and touchscreen, and one Brix to power the headnode!
This was the first time we have powered a Liquid Galaxy with Gigabyte Brix units, and the hardware proved to be extremely effective. It is a significantly sleeker solution than hardware situated in a server rack. It is also very cost-effective.
We created custom content for Gigabyte on our Content Management System. An video of one of our custom presentations can be viewed below. We built the …
event visionport
Liquid Galaxy Uses at UNC Chapel Hill
An article was posted on The Tech Broadcast last week that featured the UNC Chapel Hill Center for Faculty Excellence’s Faculty Showcase. The faculty showcase included a fantastic presentation featuring the many ways students and faculty use their Liquid Galaxy, and discussed other opportunities for using the system in the future.
Exciting examples cited of great classroom successes making use of the Liquid Galaxy include:
-
A course offered at UNC, Geography 121 People and Places, requires its students to sift through data sets and spend time in the GIS lab/research hub making maps using the data they’ve collected. The goal of this assignment is to demonstrate understanding of diversity within particular geographic entities. The students use the Liquid Galaxy to present their findings. Examples of studies done for this project include studies of fertility, infant mortality, income inequality, poverty, population density, and primary education.
-
A group of students working in lab found that the household income of a particular municipality was many times greater than all surrounding municipalities. By looking around on the Liquid Galaxy, they discovered an enormous plantation in …
education visionport clients
Client Case Study: Carjojo
Carjojo’s site makes use of some of the best tools on the market today for accessing and displaying data. Carjojo is a car buying application that takes data about car pricing, dealer incentives, and rebate programs and aggregates that into a location-specific vehicle pricing search tool. The Carjojo work presented a great opportunity for End Point to utilize our technical skills to build a state-of-the-art application everyone is very proud of. End Point worked on the Carjojo development project from October of 2014 through early 2016, and the final Carjojo application launched in the summer of 2016. This case study shows that End Point can be a technology partner for a startup, enabling the client to maintain their own business once our part of the project is over.
Why End Point?

Reputation in full stack development
End Point has deep experience with full stack development so for a startup getting advice from our team can prove really helpful when deciding what technologies to implement and what timelines are realistic. Even though the bulk of the Carjojo work focused on specific development pieces, having developers available to help advise on the entire stack allows a small …
angular case-study clients django
Office Space Available at End Point HQ!
Our office-mates are leaving, and we are looking to fill their desk space. There are 8 open desks available, including one desk in a private office.
Amenities include free wifi, furniture, conference room access, kitchen access, regular office cleaning, and close proximity (one block) to Madison Square Park.
Our company, End Point, is a tech company that builds ecommerce sites, and also develops the Liquid Galaxy. There are typically 4 or 5 of us in the office on a given day. We are quiet, friendly, and respectful.
Please contact us for more information.
company
Seedbank: Structured Seed Files for Rails Projects
Rails seed files are a useful way of populating a database with the initial data needed for a Rails project. The Rails db/seeds.rb file contains plain Ruby code and can be run with the Rails-default rails db:seed task. Though convenient, this “one big seed file” approach can quickly become unwieldy once you start pre-populating data for multiple models or needing more advanced mechanisms for retrieving data from a CSV file or other data store.
The Seedbank gem aims to solve this scalability problem by providing a drop-in replacement for Rails seed files that allows developers to distribute seed data across multiple files and provides support for environment-specific files.
Organizing seed files in a specific structure within a project’s db/seeds/ directory enables Seedbank to either run all of the seed files for the current environment using the same rails db:seed task as vanilla Rails or to run a specific subset of tasks by specifying a seed file or environment name when running the task. It’s also possible to fall back to the original “single seeds.rb file” approach by running rails db:seed:original.
Given a file structure like:
db/seeds/
courses.seeds.rb
development/ …database rails
Job opening: Fulfillment Manager
This position has been filled. See our active job listings here.
This role is based in our Bluff City, Tennessee office, and is responsible for everything about fulfillment of our Liquid Galaxy and other custom-made hardware products, from birth to installation. See visionport.com to learn more about Liquid Galaxy.
What is in it for you?
- Interesting and exciting startup-like atmosphere at an established company
- Opportunity for advancement
- Benefits including health insurance and self-funded 401(k) retirement savings plan
- Annual bonus opportunity
What you will be doing:
- Manage receiving, warehouse, and inventory efficiently
- Oversee computer system building
- Product testing and quality assurance
- Packing
- Shipment pick-up
- Communicate with and create documents for customs for international shipping
- Be the expert on international shipping rules and regulations
- Delivery tracking and resolution of issues
- Verify receipt of intact, functional equipment
- Resolve RMA and shipping claims
- Help test and implement any new warehouse software and processes
- Design and implement new processes
- Use effectively our project software (Trello) to receive and disseminate project information
- Manage fulfillment employees and office facility
- Work through emergency situations …
jobs-closed
Bash: loop over a list of (possibly non-existing) files using wildcards with nullglob (or failglob) option
Let’s say you’re working in Bash, and you want to loop over a list of files, using wildcards.
The basic code is:
#!/bin/bash
for f in /path/to/files/*; do
echo "Found file: $f"
doneEasy as that. However, there could be a problem with this code: if the wildcard does not expand to actual files (i.e. there’s no file under /path/to/files/ directory), $f will expand to the path string itself, and the for loop will still be executed one time with $f containing “/path/to/files/*”.
How to prevent this from happening? Nullglob is what you’re looking for.
Nullglob, quoting shopts man page, “allows filename patterns which match no files to expand to a null string, rather than themselves”.
Using shopt -s you can enable BASH optional behaviors, like Nullglob. Here’s the final code:
#!/bin/bash
shopt -s nullglob
for f in /path/to/files/*; do
echo "Found file: $f"
doneAnother interesting option you may want to check for, supported by Bash since version 3, is failglob.
With failglob enabled, quoting again, “patterns which fail to match filenames during filename expansion result in an expansion error”. Depending on what you need, that could even be a better behavior. …
shell linux










