Nп/п : 85 из 88
От : Maurice Kinal 2:280/464.113 19 май 25 20:33:48
К : Grant Weasner 19 май 25 00:18:02
Тема : text reformating
----------------------------------------------------------------------------------
@MSGID: 2:280/464.113 682b95ac
@CHRS: UTF-8 4
Hej Grant!
----- example.text
The above example indicates that the backup.sh script should be
executed every day, with a delay of 15 mins. i.e When the laptop was
started, executed it only after 15 minutes.
For the above line (paragraph) this will work;
$ sed `s/^ *//` example.text | fold -sw 61 | sed `s/^/ /`
The above example indicates that the backup.sh script should
be executed every day, with a delay of 15 mins. i.e When the
laptop was started, executed it only after 15 minutes.
Note that the width is 61 characters before tacking on the
indentation of three spaces. Also note that the width is characters ***NOT***
bytes.
$ trans -b -no-ansi -t ukrainian -i example.text | fold -sw 61 | sed `s/^/ /`
╨Э╨░╨▓╨╡╨┤╨╡╨╜╨╕╨╣ ╨▓╨╕╤Й╨╡ ╨┐╤А╨╕╨║╨╗╨░╨┤ ╨▓╨║╨░╨╖╤Г╤Ф ╨╜╨░ ╤В╨╡,
╤Й╨╛ ╤Б╤Ж╨╡╨╜╨░╤А╤Ц╨╣ ╤А╨╡╨╖╨╡╤А╨▓╨╜╨╛╨│╨╛
╨║╨╛╨┐╤Ц╤О╨▓╨░╨╜╨╜╤П.Sh ╨┐╨╛╨▓╨╕╨╜╨╡╨╜ ╨▓╨╕╨║╨╛╨╜╤Г╨▓╨░╤В╨╕╤Б╤М
╤Й╨╛╨┤╨╜╤П, ╤Ц╨╖ ╨╖╨░╤В╤А╨╕╨╝╨║╨╛╤О 15
╤Е╨▓╨╕╨╗╨╕╨╜. ╤В╨╛╨▒╤В╨╛, ╨║╨╛╨╗╨╕ ╨╜╨╛╤Г╤В╨▒╤Г╨║ ╨▒╤Г╨▓
╨╖╨░╨┐╤Г╤Й╨╡╨╜╨╕╨╣, ╨▓╨╕╨║╨╛╨╜╤Г╨▓╨░╨▓ ╨╣╨╛╨│╨╛
╨╗╨╕╤И╨╡ ╤З╨╡╤А╨╡╨╖ 15 ╤Е╨▓╨╕╨╗╨╕╨╜.
If the application you are using to read this is utf8 capable you
will note that the translation is still counting 16 bit characters
(Cyrillic) as one. To get fold to wrap bytes then add the -b switch to fold
since the default is characters. For strictly 7 and 8 bit characters, -b
and -c are the same.
Het leven is goed,
Maurice
o- o- -o o-
/) /) (\\ /)
^^ ^^ ^^ ^^
... ├╛a ├╛urfon swi├╛e lytles, ├╛e maran ne willnia├╛ ├╛onne genoges.
They need very little who desire no more than enough.
--- GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu)
* Origin: Little Mikey`s EuroPoint @ (2:280/464.113)
SEEN-BY: 50/13 279 103/705 124/5016 153/757 154/10
30 203/0 221/0 240/1120
SEEN-BY: 240/5832 263/1 280/464 464 5003 292/854
8125 301/1 310/31 341/66 234
SEEN-BY: 396/45 423/120 460/58 467/888 633/280
712/848 770/1 5020/400 545 848
SEEN-BY: 5020/1042 1477 4441 12000 5025/3 75
5030/1081 1900 1957 2404 5037/7
SEEN-BY: 5053/58 5060/900 5066/18 5080/102 5095/20
6078/80
@PATH: 280/464 5020/545 4441