Bash, sed: 228 223 197 (242 - 70) = 172
c=${5:-=};R=$c;L=;for f in r l;do
e="sed -e ";$e"$ d;s/$\| */ \n/g" $1>m
o=1;for w in `$e"$ p;d" $1`;do
$e"$o,/^$w /s/^$w /$L$w$R /" m>n;o="/$c/"
cp n m;done;tr -d \\n<n|fold -sw${2:-35}|$e"s/$c/ /g">$f
L=$c;R=;done;pr -tmw${3:-80} ${4:-l r}
Nếu tập lệnh nằm trong một tập tin thực thi có tên là "stereo", thì hãy gõ
stereo file.in [column_width [page_width ["r l"]]]
cột_ băng thông là một số; 25-45 sẽ hoạt động, mặc định là 35.
page_creen là một số, nên gấp khoảng hai lần cột_ thong, mặc định là 80
Để xem bằng mắt, sử dụng "r l" làm đối số thứ 4. Mặc định là "l r", thiết lập để xem song song.
EDIT: Viết lại để chia tệp thành một từ trên mỗi dòng, sau đó lắp lại ở cuối. Lưu ý: bảo lưu dấu "=" để sử dụng riêng. Bất kỳ dấu "=" nào trong tệp đầu vào sẽ trở thành khoảng trống.
EDIT: Nếu thông điệp của bạn có dấu "=" trong đó, bạn có thể chọn một biểu tượng khác cho tập lệnh để sử dụng, bằng cách cung cấp nó làm tham số thứ 5.
Thí dụ
Đầu vào: chayism.txt:
I invented vegetarianism. It is a diet involving no meat, just
vegetables. It is also common in cows - they are awesome.
vegetarianism. is awesome.
Kết quả
./st bd chayism.txt 32 72 "l r": | mở rộng (sử dụng dấu hai chấm cho biểu tượng làm việc bên trong của nó)
I invented vegetarianism. It I invented vegetarianism. It
is a diet involving no meat, is a diet involving no meat,
just vegetables. It is also just vegetables. It is also
common in cows - they are common in cows - they are
awesome. awesome.
./st bd washington.txt 35 75 "l r" | mở rộng
In a little district west of In a little district west of
Washington Square the streets Washington Square the streets
have run crazy and broken have run crazy and broken
themselves into small strips themselves into small strips
called 'places'. These 'places' called 'places'. These 'places'
make strange angles and curves. make strange angles and curves.
One Street crosses itself a time One Street crosses itself a time
or two. An artist once discovered or two. An artist once discovered
a valuable possibility in this a valuable possibility in this
street. Suppose a collector with a street. Suppose a collector with a
bill for paints, paper and canvas bill for paints, paper and canvas
should, in traversing this route, should, in traversing this route,
suddenly meet himself coming suddenly meet himself coming
back, without a cent having been back, without a cent having been
paid on account! paid on account!
"| Mở rộng" là không cần thiết nhưng khi thay đổi đầu ra theo 4 vị trí thì TAB được xử lý không chính xác. Nó có thể được đưa vào tập lệnh với chi phí 7 byte.
Biến thể ImageMagick
Thay thế dòng cuối cùng bằng lệnh ImageMagick từ văn bản sang hình ảnh:
c=${6:-=};R=$c;L=;for f in r l;do
e="sed -e ";$e"$ d;s/$\| */ \n/g" $1>m
o=1;for w in `$e"$ p;d" $1`;do
$e"$o,/^$w /s/^$w /$L$w$R /" m>n;o="/$c/"
cp n m;done;tr -d \\n<n|fold -sw${2:-35}|$e"s/$c/ /g">$f
L=$c;R=;done;
convert -border 10x30 label:@${4:-l} label:@${5:-r} +append show:
Trong trường hợp này, "r" và "l" để xem chéo và xem song song là các đối số riêng biệt:
./im_st bd chayism.txt 40 80 lr =

(nguồn: simplesystems.org )
EDIT 3: Đã thêm biến thể ImageMagick.