public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
* bash regular expressions
@  Ned
   ` Lorenzo Taylor
   ` Ralph W. Reid
  0 siblings, 2 replies; 5+ messages in thread
From: Ned @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~ UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
 bash regular expressions Ned
 ` Lorenzo Taylor
   ` Ned
   ` Sean McMahon
 ` Ralph W. Reid

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).