From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fed1rmmtao01.cox.net ([68.230.241.38]) by speech.braille.uwo.ca with esmtp (Exim 3.36 #1 (Debian)) id 1DIVHm-0001MM-00 for ; Mon, 04 Apr 2005 13:22:50 -0400 Received: from nedelko83f1172 ([68.228.49.78]) by fed1rmmtao01.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with SMTP id <20050404172200.LHSE9923.fed1rmmtao01.cox.net@nedelko83f1172> for ; Mon, 4 Apr 2005 13:22:00 -0400 Message-ID: <000801c5393a$d6684050$4e31e444@nedelko83f1172> From: "Ned" To: "Speakup is a screen review system for Linux." Date: Mon, 4 Apr 2005 10:22:11 -0700 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: bash regular expressions X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Speakup is a screen review system for Linux." List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2005 17:22:55 -0000 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