From: "Ned" <ngranic@cox.net>
To: "Speakup is a screen review system for Linux." <speakup@braille.uwo.ca>
Subject: bash regular expressions
Date: Mon, 4 Apr 2005 10:22:11 -0700 [thread overview]
Message-ID: <000801c5393a$d6684050$4e31e444@nedelko83f1172> (raw)
Hi all,
I wrote a bash script and all but the two commands below were marked wrong, so I need to correct them. Hope you don't mind pointing out my mistakes:
1. needs to output how many lines are there with a . (period) in them. I used the escape char \ before the period, but it apparently didn't work.
echo Output the number of lines that have a \"\.\" \(period\):
grep -c \. ./test.file
2. this one needs to output the number of lines containing the string '/*':
echo Output the number of lines that have the string \"'/'\*\":
grep -c /\* ./test.file
Thanks a lot in advance!
Ned
next reply other threads:[~ UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
Ned [this message]
` Lorenzo Taylor
` Ned
` Sean McMahon
` Ralph W. Reid
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='000801c5393a$d6684050$4e31e444@nedelko83f1172' \
--to=ngranic@cox.net \
--cc=speakup@braille.uwo.ca \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).