ball
Well, you can use shar(1) , but it puts an X in front of every line that you are likely to find annoying. (Shar came with my Mac, but on my Linux systems you need to add a package.)
Shar is a simple, short shell script itself, so you can easily modify it to work without X.
You can try copying / usr / bin / shar to / tmp and apply this diff with patch(1) .
--- /usr/bin/shar 2009-07-13 22:26:18.000000000 -0700 +++ /tmp/shar2 2010-12-24 19:05:34.000000000 -0800 @@ -65,8 +65,8 @@ echo "mkdir -p $i > /dev/null 2>&1" else echo "echo x - $i" - echo "sed 's/^X//' >$i << 'END-of-$i'" - sed 's/^/X/' $i + echo "cat >$i << 'END-of-$i'" + cat $i echo "END-of-$i" fi done
source share