Subj : Re: -Unpublished- with speed > 300 To : Nigel Reed From : Wilfred van Velzen Date : Sat Dec 09 2023 16:05:25 Hi Nigel, On 2023-12-09 08:53:10, you wrote to me: >> This seems unnecessarily complex, and it requires the dos2unix step, >> which requires an extra edit because my dos2unix at first regards the >> file as a binary file because of the ^Z at the end, and refuses to >> convert it. NR> That's what the force option is for :) Of course, but you don't need to use dos2unix at all. >> And for me it gives 82. But that is because it also counts these lines >> in the Z2 version of the nodelist: >> >> ;S The use of all zero telephone numbers instead of "-Unpublished-" >> for ;S MakeNl that allows the use of "-Unpublished-" without Pvt for >> IP only NR> So add |grep -v ^; Making it even more "complex"! ;) NR> There's nothing really complex about it. You find all the lines with NR> unpublished, then you cut off the first couple of fields that may have a NR> 300 in the network or node number, then you remove anything with ,300, in NR> it, and then anything with 300 at the end of the line, and then if you add NR> grep -v ^; it'll remove anything with a semi colon at the start of the NR> line. NR> I'm sure some genius will come up with an awk version but it won't be NR> easier to understand, or you could write a perl script to do it, I'm sure. So what is wrong with my original version, that uses just 2 grep commands, and doesn't require the use of dos2unix with a special option before hand? Here it is again, in case you missed it: # grep -i ',-Unpublished-,' NODELIST.342 | grep -iv ',-Unpublished-,300' Bye, Wilfred. --- FMail-lnx64 2.2.1.0 * Origin: NPC Station (2:280/464) .