ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Teimuraz Abashidze <tgasoft@gmail.com>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: [Comm] Конверт в AASCII
Date: Wed, 9 Nov 2011 17:36:16 +0400
Message-ID: <CAEFkYhgJKkpFC+461sKUeaVdVHNtkL-n+mt=D1G=cDkD2uk1KQ@mail.gmail.com> (raw)

Задача: некий файл нужно привести к 7-битному виду. Система отправки
СМС по имейлу, посылаешь письмо на НОМЕР_МОБИЛЫ@НЕКИЙ_ДОМЕН, там оно
обрабатывается и кладется в мейлбокс. Принимающий сервер - на винде
плюс некая проприетарная ситема российской разработки, читающая почту
с почтового сервака и отправляющая на СМС.

Почтовый сервер - Центос, плюс небольшой шелловский скрипт.

Присылаемый текст должен обрезаться до 160 символов, но так как
отправлен может быть и HTML (что и делает как правило любимый
АутГлюк), его нужно преобразовать в текст (lynx --dump INFILE >
OUTFILE решает дело), при этом текст не должен содержать ничего
"лишнего": кириллических или иных не-латинских символов, управляющих
кодов и т.д., иначе принимающая система (которая получает письмо с
Центоса и непосредственно занимается отправкой) шизеет и её нужно
перегружать. Поменять тупую систему не предлагать, не мы делали...

В общем: как убрать из текст ВСЁ, кроме латинских символов, цифр и
всяких @#%^^&*()?
Желательно средствами баш/sed и т.д., допускаются перл и/или питон.

Заранее спасибо.

-- 
Best regards,
 Teimuraz Abashidze
--------------------------------------------
Linux user #140208
---Visit my home page:
http://www.facebook.com/teimuraz.abashidze - FaceBook
http://forum.tbilicity.com - Тбилисский форум
http://raindi.ge/taichi - Тайцзицзюань в Тбилиси
http://picasaweb.google.com/tgasoft/ - Мои фото
http://teimuraz1962.livejournal.com - Я в ЖЖ
kalia1962 - Skype

             reply	other threads:[~2011-11-09 13:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09 13:36 Teimuraz Abashidze [this message]
2011-11-09 14:03 ` Yury Aliaev
2011-11-09 14:21   ` Teimuraz Abashidze
2011-11-09 15:06 ` Andrew G. Klepcha

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='CAEFkYhgJKkpFC+461sKUeaVdVHNtkL-n+mt=D1G=cDkD2uk1KQ@mail.gmail.com' \
    --to=tgasoft@gmail.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