POV-Ray : Newsgroups : povray.newusers : selecting several thousand lines in pov file : Re: selecting several thousand lines in pov file Server Time
30 Jul 2024 20:30:21 EDT (-0400)
  Re: selecting several thousand lines in pov file  
From: Warp
Date: 16 Sep 2003 10:51:21
Message: <3f672364@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:
> cat mesh2.pov | head -n 17361 | tail -n `expr 17361 - 8605`

  Useless use of cat...
  'cat' is a command for catenating files (the counterpart of 'split').
Catenating one file with nothing makes no sense at all.

  The good-style way of doing it is:

head -n 17361 mesh2.pov | tail -n `expr 17361 - 8605`

  However, that command still has useless junk. You can do it like this:

head -17361 mesh2.pov | tail +8756

(if you want to keep the calculation, you can do it more efficiently like
this, at least in zsh:
head -17361 mesh2.pov | tail +${17361-8605}
)


-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.