Skip to content

Instantly share code, notes, and snippets.

@kyab

kyab/cot

Created May 21, 2011
Embed
What would you like to do?
cot : let's pipe to CotEditor, like mate for TextMate.
#!/bin/bash
#pipe to cotEditor
#example:
# ls -alF | cot.sh
# man mount | col -b | cot.sh
file=`mktemp -t cot`
rm -f $file
cat - >> $file
open -a CotEditor $file
#echo "stdout is redirected to CotEditor"
#This does not work!!
#while read a; do
# echo -e $a >> $file
# echo -e \ttabbed >> $file
# echo -e \\ttabbed >> $file
#done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.