#!/bin/bash for i in examples/*.amos test/*.amos; do echo "$i" ~/Projects/amostools/listamos -e AMOSPro_BSDSocket.Lib "${i}" > "${i%.amos}.basic" 2>/dev/null done