#!/bin/bash for x in "$@"; do NAME="${x:0:-4}" echo "$NAME"; gnetlist -g bom "$x" -o "$NAME".bom.csv -Oattribs=dni,device,footprint,value done