Sed

Batch convert Wordstar-encoded files to text files
for i in *; do strings -a -n 1 "$i" | sed -e :a -e '$!N;s/\n/ /;ta' > "${i%%.*}.txt" done
 * 1) !/bin/bash

List all the files in a large directory on a single line
ls -1 | sed -e :a -e '$!N;s/\n/ \/ /;ta'



Morse code
s/.*/\U&/ s/$/\nA.-B-...C-.-.D-..E.F..-.G--.H....I..J.---K-.-L.-..M--N-.O---P.--.Q--.-R.-.S...T-U..-V...-W.--X-..-Y-.--Z--../ :a s/([A-Z])([^\n]*\n.*\1([-.]+))/\3 \2/ ta s/\n.*//
 * 1) !/bin/sed -rf