≡ Menu

grep command

I got over 100s of HTML files in the following format:

 
<html>
<head>
 <title>Statistics for ABC LTD - January 2007 - Rang IDXYZZAZZZZ</title>
</head>
 
<body BGCOLOR="#E8E8E8" TEXT="#000000" LINK="#0000FF" VLINK="#FF0000">
<h2>Statistics for ABC LTF</h2>
<small><strong>
Summary Period: January 2007<br />
Generated 01-Feb-2007 06:40 CET<br />
</strong></small>
<center>
<hr />
<p>
<font SIZE="-1"></font></p></center><pre>
 
my data 1
my data 2
my data 3
my data 10000
my data N times
 

Generated by MyAppDbStatsWriter (UNIX) version 1.9b2


How do I extract text between two words (<PRE> and </PRE>) in unix or linux using grep command?
[click to continue…]

FreeBSD: Display Laptop Battery Charge Status

How do I find out out details about my FreeBSD based Laptop battery status and other information from command prompt? Howto do I check battery charge status at shell prompt?
[click to continue…]

How do I see a list of all exported variables and functions under Unix bash shell?
[click to continue…]

Unix / Linux: grep Word Count Command

How do I count words using grep command under Linux / Unix like operating systems?
[click to continue…]

I am a new Unix (OS X to be specific) user. How do I show line number while displaying the output using the grep command on Linux or Unix-like operating systems? How can I show matched lines together with their line numbers on my Terminal?
[click to continue…]

Linux / Unix: Tarball Delete ( remove ) File

How do I delete OR remove a single file from within a tar ball under Unix / Linux like operating systems?
[click to continue…]

How do I delete old yum repositories and configuration files under RHEL 5 or CentOS Linux server?
[click to continue…]