Linux Shell Script For Each File in a Directory Grab the filename and execute a program January 6, 2023 by Tarik bash: for f in *.xls ; do xls2csv "$f" "${f%.xls}.csv" ; done