#!/bin/bash xmp=$1.RAF.xmp #hardcoded for fuji but can be made to search a variety of extensions with little work. if [ -f "$xmp" ]; then sed -i "s/xmp:Rating=\".\"/xmp:Rating=\"$2\"/" $xmp else echo " " > $xmp fi