Subj : text reformating
To   : All
From : Grant Weasner
Date : Mon May 19 2025 01:24 am

Hello all.

I'm wondering what others think about linux a text formating task I'm trying to solve.

I've got lots of older howtos from the old web, and stuff I've also wrote.

I want to convert all of my text files in many directories into a gopher fiendly format.

Gopher friendly:
1) 64 columns wide.
2) any indents will remain, but if a line goes beyond 64 cols, the remaining characters will go to the line below but indent to the same column as the prior line.


This seems pretty difficult and I'm wondering how others would approch this task.

I'm thinking of just writing a python script using basic python modules.

But I'm wondering if there are just native linux tools that would work as good or  better.

EXAMPLE TEXT BELOW
-------------------------------------------------------

$ ssh skinner "dd if=/dev/sda5 | gzip -1 -" | dd of=image.gz
208782+0 records in
208782+0 records out
106896384 bytes (107 MB) copied, 22.7608 seconds, 4.7 MB/s
116749+1 records in
116749+1 records out
59775805 bytes (60 MB) copied, 23.9154 s, 2.5 MB/s

$ ll | grep image.gz
-rw-rw-r--.   1 saml saml  59775805 May 31 01:03 image.gz

 Methods for monitoring?

  1�1.�Login via ssh in another terminal and ls -l the file to see what it's size is.
  2�2.�You can use pv to monitor the progress of a large dd operation, for instance, for the remote example above, you can do:

$ dd if=/dev/sda | gzip -1 - | pv | ssh user@local dd of=image.gz

  3�3.�Send a "SIGUSR1" signal to dd and it will print stats. Something like:

$ pkill -USR1 dd
--- SBBSecho 3.20-Linux
* Origin: Lunar Outpost - lunarout.synchro.net (1:138/397)