set mysed to "sed 's/ /\\\\ /g'" set printall to "open -a /Applications/Utilities/Printer\\ Setup\\ Utility.app" set redirmytmpfile to "> /Users/rcross/Desktop/mytmpfile.txt" set mytmpfile to "/Users/rcross/Desktop/mytmpfile.txt" set thetmpfile to "> /Users/rcross/Desktop/tmp; mv /Users/rcross/Desktop/tmp /Users/rcross/Desktop/mytmpfile.txt" set snf to "echo" & " " set tv to "" set i to 0 tell application "Finder" set mysel to selection repeat with asel in mysel set i to i + 1 set thesel to item i of mysel as text set myunix to POSIX path of thesel if myunix contains " " then set tv to tv & snf & "\"" & myunix & "\"" & " " & redirmytmpfile do shell script tv do shell script mysed & " " & mytmpfile & " " & thetmpfile set s to do shell script "cat" & " " & mytmpfile set myunix to s end if do shell script printall & " " & myunix set tv to "" end repeat end tell