Shell Script: stdin2TextEdit.sh

This shell script was written for Apple/OSX. It takes whatever it receives on stdin, saves that to a file, and then opens the file via the default Text file handler (typically TextEdit).
 

#! /bin/sh

TMP=/tmp/`basename $0`_`date +'%Y-%m-%d_%H-%M-%S'`_$$.txt

cat > ${TMP}

open ${TMP}
Scroll to Top