#!/bin/bash find ./languages -type f -name "*.po" -print0 | while read -d '' -r file; do po="$file"; mo="${file%.[^.]*}.mo" echo "$po" -o "$mo" msgfmt "$po" -o "$mo" done