Summary: Disks, displaying lines # thru # in a file

From: Ju-Lien Lim (
Date: Thu Jan 22 1998 - 16:52:21 CST

My thanks to everyone who responded on my two
questions, i.e. disks and displaying certain lines in
a file (below is the summary).



Original Question (Subject: Disks):

I'm looking for recommendations from anyone
who can tell me what kind of *inexpensive* disks are
out there that can is over 4 Gigs that I can use on
Sparc 10, Sparc 20 which Online Disksuite (ODS) will
also support in terms of mirroring and RAID and will
not require a great deal of configuration in terms of
the O/S recognizing the disk.

Venkat D (

  The Best solution will be to buy from SUN but they
are bit expensive.
There are lots of companies which sell SUN drives
like Artecon,
Boxhill. The chasis and the power supplies are
different but
the disk is either from Seagate or Connors!!
As far as the ODS is concerned .. it is a software
raid so
it will not cause anyproblem if the O/S has
recognised the

D.J. Gregor" (

        Any disk should work. I HIGHLY suggest that
evaluate the performance of your application and disks
that you are looking at purchasing. I've bought some
cheap disks in the past figuring "Hey, it's just
space", and I have come to regret it because I have a
number of slow, old, clunky disks. I HATE when I have
to access data that is on these things. Just make sure
that you get drives of the same model so that their
characteristics will be the same, or else mirroring
and RAID will not perform optimally.

Original Question (Subject: Displaying lines # thru #
in a file):

Also... is there another way I can displaying lines
500-540 of a file from the prompt (sort of like `head
-540 | tail 40` )

======== (Michael Sullivan)
charest@chou.CANR.Hydro.Qc.Ca (Claude Charest)
Tim Pointing (
Stephen Harris (
D.J. Gregor (
Charles Seeger (
Jay Lessert (
Rich Kulawiec (
Joseph S. D. Yao (
Ray Smith (
Karl E. Vogel (
Jochen Bern (bern@TI.Uni-Trier.DE)

sed -n -e '500,540p' filename
sed -n -e 500,540p
sed -e '1,499d' -e '541,$d'
sed -e '1,499d' -e '540q'
head -540 /etc/termcap | tail -40 | more
head -540 < /etc/termcap | tail -40 | more
(head -540 | tail -40) < /etc/termcap | more
tail +500 | head -40

        One problem with this is that, after the lines are
printed, sed will
continue to read lines from the file (which is going
to use up lots of
CPU time etc if the file is large.)

        This is kind of nasty--pipe it through "sed
Literal translation "print lines 500-540, delete all
Every line ends up getting deleted by the "d"
command, however
lines 500-540 are printed before they are deleted, so
command works. Please note that sed isn't the
fastest thing
around, and I think that your "head -540 | tail 40"
is probably
the fastest solution using shell scripting. If other
have interesting suggestions, I wouldn't mind hearing
them, either through a SUMMARY or through private

Another solution would be to use awk...

        awk 'NR<520 {next} {print} NR==540 {exit}'

This will exit after printing the desired lines.

Get your free address at

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:29 CDT