1#!/bin/bash 2 i=0 3file=/dev/media$1 4 while :; do 5 echo $file 6 i=$((i+1)) 7 R=$(./media_device_open -d $file); 8 # clear 9 echo -e "Loop $i\n$R" 10 done 11