#!/usr/bin/env zsh cat hardware.csv | cut -d, -f 1,5 | grep -v TODO | grep -v name | grep -v ipmi | grep -v wired | while read line; do NAME=$(echo $line | cut -d, -f 1) MAC=$(echo $line | cut -d, -f 2) echo "config host" echo "\toption name '$NAME'" echo "\toption mac '$MAC'" done