From: Slava Dubrovskiy <slava@tangramltd.com> To: Community@lists.altlinux.org Subject: [Comm] Помогите с форматированием текста Date: Tue, 27 Mar 2007 17:30:55 +0300 Message-ID: <46092A9F.4010107@tangramltd.com> (raw) [-- Attachment #1: Type: text/plain, Size: 877 bytes --] Здравствуйте. Помогите со скриптом. В сети есть много скриптов, которые форматируют текст, разбивая строку на несколько до определённой длины строки. Подскажите, а как можно вернуть обратно? Подозреваю что нужно использовать sed, но не могу понять, как ему сказать, что если длина строки, например 76 символов, то объединить её с следующей? И на bash не работает :-( while [ "$name" != Smith ]; do read name long=`echo $name | wc -m` if [[ $long = "76" ]]; then name=`echo $name | sed 's/\n//'` fi echo "$name" done <"$1" -- WBR, Dubrovskiy Vyacheslav [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/x-pkcs7-signature, Size: 3249 bytes --]
next reply other threads:[~2007-03-27 14:30 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-03-27 14:30 Slava Dubrovskiy [this message] 2007-03-27 14:47 ` Eugene Ostapets 2007-03-27 15:15 ` Slava Dubrovskiy 2007-03-27 15:47 ` Eugene Ostapets 2007-03-27 16:08 ` Slava Dubrovskiy 2007-03-28 5:37 ` Slava Dubrovskiy 2007-03-27 20:14 ` Yura Kalinichenko
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=46092A9F.4010107@tangramltd.com \ --to=slava@tangramltd.com \ --cc=Community@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git