Re: [Trisquel-users] Removing unwanted carriage returns

2020-03-25 Thread amenex
Previously, I had attempted a join script: > Step (5) I attempted to join the present spreadsheet with the domains-visited and visits-per-domain data: > join -a 2 -1 1 -2 1 But the results look incomplete: only 13,000 rows of fully filled-in data with correct & complete counts, > yet there

Re: [Trisquel-users] Removing unwanted carriage returns

2020-03-23 Thread amenex
Remember the Delta Process from Calculus 1.01 ? https://www.brighthubeducation.com/homework-math-help/108376-finding-the-derivative-of-a-function-in-calculus/ That's where I am in Scripting 1.01 ... Back to the problem at hand. Step (1) selected the IPv6 addresses of the Type A & Type B rows in

Re: [Trisquel-users] Removing unwanted carriage returns

2020-03-22 Thread amenex
These "trivial" AWK programs are presently beyond my ken. Way too compact for me at this hour. In the meantime I started with this script: awk '{print $2}' 'File01.txt' | sort | uniq -c > TempTQ01.txt ; awk '{print $2, $1}' 'TempTQ01.txt' | sort -nrk 2 > TempTQ02.txt where File01.txt is the o

Re: [Trisquel-users] Removing unwanted carriage returns

2020-03-22 Thread amenex
I'll restate the problem, unencumbered by distracting arrays of colons and hexadecimals. All 387,000 rows fall into one of three types, each IP address appearing only once in the first column: Type A: $1("key" IP address), $2(CIDR block), $3(country code), $4(AS number) Type B: $1(IP addre

Re: [Trisquel-users] Removing unwanted carriage returns

2020-03-22 Thread amenex
See: https://svn.nmap.org/nmap/scripts/asn-query.nse where the applicable (?) script reads, noting especially "( "See the result for %s" ):format( last_ip )": -- ... begin snip --- -- Checks whether the target IP address is within any BGP pr

Re: [Trisquel-users] Removing unwanted carriage returns

2020-03-22 Thread amenex
Here's my present dilemma, exemplified by a snippet from the spreadsheet: 2401:4900:1888:c07f:1:2:4283:5767 2401:4900:1888:fcb4:1:2:4282:aab3 2401:4900:1888:cd70:1:1:4a58:fc0c 2401:4900:1888:fcb4:1:2:4282:aab3 2401:4900:1888:d068:fce8:8739:a7a0:4c60 240

Re: [Trisquel-users] Removing unwanted carriage returns

2020-03-22 Thread amenex
janet admonished me: > Did you even bother to read the regular expression I provided to use in vim? I stopped reading after the word, "windows."

Re: [Trisquel-users] Removing unwanted carriage returns

2020-03-22 Thread amenex
Magic Banana constructively added: > It looks like you could have nmap format its output ... Oh ! Gee ! That's a welcome suggestion. I have two more sets of IPv6 data already nmap'ed over quite a few hours that are in the old grep-unfriendly format. Fortunately, my brute-force workarounds are les

Re: [Trisquel-users] Removing unwanted carriage returns

2020-03-22 Thread vas1980i
amenex wrote: >Not just _any_ new line character: A combination of the new line character >on the end of one row, plus the phrase at the beginning of the following row. >Removing the new line characters willy-nilly will leave a one-row file with >all 750,000 lines all concatenated together ...

Re: [Trisquel-users] Removing unwanted carriage returns

2020-03-21 Thread amenex
jaret remarked: > I believe you are referencing to a new line character, ... Not just _any_ new line character: A combination of the new line character on the end of one row, plus the phrase at the beginning of the following row. Removing the new line characters willy-nilly will leave a one-row

Re: [Trisquel-users] Removing unwanted carriage returns

2020-03-21 Thread vas1980i
Install vim. Open text file in vim. Press semicolon on keyboard ( : ) Type %s/\nSee the result for/\tSee/g Press Enter. To save file and quit press semicolon : then wq then Enter. ( :wq ) I believe you are referencing to a new line character, when you are saying "carriage return". \n is the new