fmt -80 infile > outfile
Same thing, isn't it?
On Sep 25, 2017, at 5:49 PM, Linux for blind general discussion
wrote:
I forgot three lines in earlier version.
This one uses fold to force creation of 80 character lines making it easier to
edit rather than just leaving a single line in the file and that happens before
editing of file can happen.
cut here.
#!/usr/bin/env bash
# file: fcl.sh - file with character limit script.
echo -c "character limit for file:"
read
lim=$REPLY
echo -c "file name to edit"
read
ef=$REPLY
truncate --size=$lim $ef
fold $ef >$ef.f
mv $ef.f $ef
echo "remember only change lines in $ef to stay inside character limits."
nano $ef
wc -c $ef
--
___
Blinux-list mailing list
Blinux-list@redhat.com
https://www.redhat.com/mailman/listinfo/blinux-list
___
Blinux-list mailing list
Blinux-list@redhat.com
https://www.redhat.com/mailman/listinfo/blinux-list