From: "Fr. Br. George" <george@altlinux.ru>
To: ALT Linux Sisyphus discussion list <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] Помогите избавться от bashisma
Date: Sun, 3 Dec 2006 14:38:22 +0300
Message-ID: <20061203113820.GD54283@grep.po.cs.msu.su> (raw)
In-Reply-To: <45709BB6.1080102@netorn.ru>
On Sat, Dec 02, 2006 at 12:16:38AM +0300, Vadim V. Zhytnikov wrote:
> Есть простя задачка. Из набора *.texi файлов выделить те, которые
> (1) содержат символы табуляции
> (2) имеют строки с DOS-овскими окончаниями строк
>
> Для этого я использовал следующие команды
> bad_files1=`find . -name '*.texi' -print | xargs grep -l $'\t'`
> bad_files2=`find . -name '*.texi' -print | xargs grep -l $'\x0D$'`
> Ну и собственно вопрос - чем можно заменить этот bashism,
> чтобы сделать скрипт переноносимым?
Да я просто заменил на соответствующие символы! В vim-е, например,
вместо $'\t' можно написать '^V<Tab>', где ^V -- это ctrl+v, а <Tab> --
это клавиша такая :). То же и $'\r$' -- '^V^M$'.
--
George V. Kouryachy (aka Fr. Br. George)
mailto:george at altlinux_ru
next prev parent reply other threads:[~2006-12-03 11:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-01 21:16 Vadim V. Zhytnikov
2006-12-02 6:10 ` Ildar Mulyukov
2006-12-02 7:14 ` Vadim V. Zhytnikov
2006-12-02 6:35 ` Вадим Илларионов
2006-12-02 7:09 ` Vadim V. Zhytnikov
2006-12-02 12:27 ` Yura Kalinichenko
2006-12-02 16:12 ` Vadim V. Zhytnikov
2006-12-03 11:38 ` Fr. Br. George [this message]
2006-12-03 12:03 ` Vadim V. Zhytnikov
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=20061203113820.GD54283@grep.po.cs.msu.su \
--to=george@altlinux.ru \
--cc=sisyphus@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 Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git