From: Jury Levykin <altcomm@list.ru> To: community@altlinux.ru Subject: [Comm] Вопрос по bash и grep Date: Sat, 20 Nov 2004 15:01:54 +0300 Message-ID: <419F3232.3080400@list.ru> (raw) Столкнулся со следующей проблемой: при использовании команды grep: cat $FILE | grep 'text1 text2' команда выполлняется правильно, но мне нужно брать строку 'text1 text2' из переменной: S='text1 text2' cat $FILE | grep $S в этом случае получаю следующее: grep: text2: No such file or directory Я пробовал следующие варианты: S=\''text1 text2'\' cat $FILE | grep $S S=\"'text1 text2'\" cat $FILE | grep $S S=\''text1 text2'\' cat $FILE | grep ${S} результат тотже. :( Поиски в интернете и чтение man grep результата на дали. Подскажите, в чем здесь проблема, почему если паттерн задан как переменная grep режет его на части?
next reply other threads:[~2004-11-20 12:01 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-11-20 12:01 Jury Levykin [this message] 2004-11-20 12:29 ` Maxim Bodyansky 2004-11-20 12:56 ` Jury Levykin 2004-11-20 12:40 ` Alex Yustasov
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=419F3232.3080400@list.ru \ --to=altcomm@list.ru \ --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