#! /bin/sh

DEFAULT_NAME="Brief*"

RESULT=`osascript << ENDOFSCRIPT

to getNameOfFrontProcess()
    tell application "System Events"
        set pairs to {name, frontmost} of every process
    end tell
    repeat with p from 1 to count item 1 of pairs
        if item p of item 2 of pairs then return (item p of item 1 of pairs) as string
    end repeat
end getNameOfFrontProcess
try
tell application (my getNameOfFrontProcess())
    display dialog "Bitte Dateiname eingeben:" default answer "${DEFAULT_NAME}"
end tell
if button returned of the result is "OK" then
    text returned of the result
end if
on error
end try

ENDOFSCRIPT`

if [ "${RESULT}" != "" ] ; then
   find / -name ${RESULT} -print
fi