#/!bin/sh asfd # Open stdin in a text editor and sends modified selection to stdout xeditor=${XEDITOR:-gedit} f=$(mktemp) cat > "$f" $xeditor "$f" && cat "$f"