From: "Dmytro O. Redchuk" <dor@ldc.net> To: ALT Linux Community <community@altlinux.ru> Subject: На один cat меньше Re: [Comm] Замена одного двумя Date: Mon, 19 Sep 2005 17:11:42 +0300 Message-ID: <20050919141142.GD4584@ldc.net> (raw) In-Reply-To: <e12fd2db05091907045fd6bdde@mail.gmail.com> On Mon, Sep 19, 2005 at 05:04:11PM +0300, Eugene Ostapets wrote: > 19.09.05, Aleksander N. Gorohovski<angel feht.dgtu.donetsk.ua> написал(а): > > Доброго времени суток сообщество! > > > > Подскажите как можно элегантно средствами bash > > выполнить замену одного символа в файле двумя другими? > > > > Пробовал, например: > > tr -s "1" "23" < file1 > file2 > > ругается (вообщем справедливо) и не помогает. > Это не bash > > > > Конечно можно и на Perl программку сделать, но хотелось bash. > Ну на таком баше и я могу: cat file1 | sed 's@1@23@g' > file2 или sed 's@1@23@g' < file1 > file2 > subst 's@1@23@g' file > > > -- > С уважением, > Евгений Остапец > uin: 23747217 > jid: eugene_ostapets@jabber.ru -- _,-=._ /|_/| `-.} `=._,.-=-._., @ @._, `._ _,-. ) _,.-' ` G.m-"^m`m' Dmytro O. Redchuk
next prev parent reply other threads:[~2005-09-19 14:11 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-09-19 12:56 Aleksander N. Gorohovski 2005-09-19 14:04 ` Eugene Ostapets 2005-09-19 14:11 ` Dmytro O. Redchuk [this message] 2005-09-20 5:34 ` На один cat меньше " Aleksander N. Gorohovski 2005-09-20 5:30 ` Aleksander N. Gorohovski
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=20050919141142.GD4584@ldc.net \ --to=dor@ldc.net \ --cc=community@altlinux.ru \ /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