select_for_meld:
#!/bin/sh
quoted=$(echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | awk 'BEGIN { FS = "\n" } { printf "%s", $1 }' )
echo "$quoted" > $HOME/.meld/nautilus
compare_to_meld:
#!/bin/sh
arg1=$(cat $HOME/.meld/nautilus)
arg2=$(echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | awk 'BEGIN { FS = "\n" } { printf "%s", $1 }' )
if [ "$(arg1)" -eq "0" ];then
zenity --info --text "No files Selected!"
exit 1
fi
meld "$arg1" "$arg2"
把两个文件放入
home .gnome2 nautilus-scripts 下