Re: this needs testing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fmt -80 infile > outfile

Same thing, isn't it?

On Sep 25, 2017, at 5:49 PM, Linux for blind general discussion <blinux-list@xxxxxxxxxx> 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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list

_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list



[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]