Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Good day for overcoming obstacles. Try a steeplechase.


comp / comp.mobile.android / Re: What is using Android adb port 55555 and/or 5555 on Windows

SubjectAuthor
* What is using Android adb port 55555 and/or 5555 on WindowsAndrew
`* Re: What is using Android adb port 55555 and/or 5555 on WindowsArno Welzel
 `* Re: What is using Android adb port 55555 and/or 5555 on WindowsAndrew
  `* Re: What is using Android adb port 55555 and/or 5555 on WindowsAndy Burns
   `* Re: What is using Android adb port 55555 and/or 5555 on WindowsAndrew
    +- Re: What is using Android adb port 55555 and/or 5555 on WindowsAndy Burns
    `- Re: What is using Android adb port 55555 and/or 5555 on WindowsJava Jive

1
Subject: What is using Android adb port 55555 and/or 5555 on Windows
From: Andrew
Newsgroups: comp.mobile.android, alt.comp.os.windows-10, alt.comp.networking.connectivity
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
Date: Fri, 19 Jul 2024 14:14 UTC
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: andrew@spam.net (Andrew)
Newsgroups: comp.mobile.android,alt.comp.os.windows-10,alt.comp.networking.connectivity
Subject: What is using Android adb port 55555 and/or 5555 on Windows
Date: Fri, 19 Jul 2024 14:14:18 -0000 (UTC)
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID: <v7dsbq$2jit$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 19 Jul 2024 14:14:18 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="85597"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: NewsTap/5.5 (iPad)
Cancel-Lock: sha1:dQw5mKcNm43pf6A4K61xQ9DOtUs= sha256:qstJXJsTy9Otur8GSPCTpOpxpIq57ZAr1cxkuiaI6EU=
sha1:Q2UCBFpoPslut7nhLckR3WfN1Po= sha256:JGQl5ntp0JyJDtgBl/ihjObsDtlcWlctTFOqP7n/pCU=
X-Face: VQ}*Ueh[4uTOa]Md([|$jb%rw~ksq}bzqA;z-.*8JM`4+zL[`N\ORHCI80}]}$]$e5]/i#v qdYsE`yh@ZL3L{H:So{yN)b=AZJtpaP98ch_4W}
View all headers

I never fully understood networking - as I never had much problems.
However... this happens: <https://i.postimg.cc/28n8vs1j/adb-port-55555.jpg>

Background:
1. I boot up the PC & I use adb every day, all day, while I'm at home.
2. My phone is always connected by USB or Wi-Fi over adb on Windows 10.
3. Mostly I use adb to mirror Android onto Windows when I'm at my desk.

This way I can operate the Android phone using the Windows PC hardware
(keyboard, mouse, display, speakers, microphone, clipboard).

I shut down every night and every once in a while the adb default port is
"broken" for reasons unknown to me. This happens infrequently - but it
happens enough that I need a better debugging technique.

Normally rebooting solves the problem but why should I not know what is
hanging up port 55555 (adb over Wi-Fi) and/or port 5555 (adb on USB)?

Below is the log of what you see in the screenshot.
While a reboot will almost certainly solve it, why should I need to boot?

Q: Do you have advice on how to fix what is using adb default ports?
<https://i.postimg.cc/28n8vs1j/adb-port-55555.jpg>

C:\app\editor\android\scrcpy>adb devices
* daemon not running; starting now at tcp:55555
could not read ok from ADB Server
* failed to start daemon
adb.exe: failed to check server version: cannot connect to daemon

C:\app\editor\android\scrcpy>adb connect 192.168.1.4:55555
* daemon not running; starting now at tcp:55555
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon

C:\app\editor\android\scrcpy>usb
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
* daemon not running; starting now at tcp:55555
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon
ERROR: "adb start-server" exited unexpectedly
ERROR: Could not start adb daemon
ERROR: Server connection failed

C:\app\editor\android\scrcpy>scrcpy -s 192.168.1.4
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
* daemon not running; starting now at tcp:55555
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon
ERROR: "adb start-server" exited unexpectedly
ERROR: Could not start adb daemon
ERROR: Server connection failed

C:\app\editor\android\scrcpy> adb connect 192.168.1.4:38287
* daemon not running; starting now at tcp:55555
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon

C:\app\editor\android\scrcpy> adb pair 192.168.1.4:37011
Enter pairing code: 253341
* daemon not running; starting now at tcp:55555
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon

C:\app\editor\android\scrcpy>netstat | findstr 55555
C:\app\editor\android\scrcpy>nmap -vvv 192.168.1.4 -p 55555
Starting Nmap 7.93 ( https://nmap.org ) at 2024-07-19 08:57 Central
Daylight Time
Initiating ARP Ping Scan at 08:57
Scanning 192.168.1.4 [1 port]
Completed ARP Ping Scan at 08:57, 0.23s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 08:57
Completed Parallel DNS resolution of 1 host. at 08:57, 0.03s elapsed
DNS resolution of 1 IPs took 0.19s. Mode: Async [#: 2, OK: 0, NX: 1, DR: 0,
SF: 0, TR: 1, CN: 0]
Initiating SYN Stealth Scan at 08:57
Scanning 192.168.1.4 [1 port]
Completed SYN Stealth Scan at 08:57, 0.07s elapsed (1 total ports)
Nmap scan report for 192.168.1.4
Host is up, received arp-response (0.13s latency).
Scanned at 2024-07-19 08:57:14 Central Daylight Time for 0s

PORT STATE SERVICE REASON
55555/tcp closed unknown reset ttl 64
MAC Address: 3E:56:75:5C:0C:DB (Unknown)

Read data files from: C:\app\network\scanner\nmap
Nmap done: 1 IP address (1 host up) scanned in 0.93 seconds
Raw packets sent: 2 (72B) | Rcvd: 2 (68B)

Subject: Re: What is using Android adb port 55555 and/or 5555 on Windows
From: Arno Welzel
Newsgroups: comp.mobile.android, alt.comp.os.windows-10, alt.comp.networking.connectivity
Date: Sun, 21 Jul 2024 11:39 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@arnowelzel.de (Arno Welzel)
Newsgroups: comp.mobile.android,alt.comp.os.windows-10,alt.comp.networking.connectivity
Subject: Re: What is using Android adb port 55555 and/or 5555 on Windows
Date: Sun, 21 Jul 2024 13:39:04 +0200
Lines: 30
Message-ID: <lg4aamFbavdU2@mid.individual.net>
References: <v7dsbq$2jit$1@nnrp.usenet.blueworldhosting.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: individual.net gpXjMnH2sYce/lhgZ9276w227+wSxDoTndVY1IBQv/ese5j232
Cancel-Lock: sha1:/NbCc7JxFlaxoprN3F5rZK7Xccs= sha256:p2N90EKf/Acjv+r2ikp4NQD7x1BkZmCnhGA0q2kyxlA=
Content-Language: de-DE
In-Reply-To: <v7dsbq$2jit$1@nnrp.usenet.blueworldhosting.com>
View all headers

Andrew, 2024-07-19 16:14:

> I never fully understood networking - as I never had much problems.
> However... this happens: <https://i.postimg.cc/28n8vs1j/adb-port-55555.jpg>
>
> Background:
> 1. I boot up the PC & I use adb every day, all day, while I'm at home.
> 2. My phone is always connected by USB or Wi-Fi over adb on Windows 10.
> 3. Mostly I use adb to mirror Android onto Windows when I'm at my desk.

Depending in your Windows version, you may use netstat in an
administrative Windows console:

netstat -anb

This will show all open ports and the name of the process which opened
it. The options used:

a - all ports, including the ones which are listening for incoming
connections

n - do not try to resolve names for IP addresses

b - show the name of the process which opened the port

--
Arno Welzel
https://arnowelzel.de

Subject: Re: What is using Android adb port 55555 and/or 5555 on Windows
From: Andrew
Newsgroups: comp.mobile.android, alt.comp.os.windows-10, alt.comp.networking.connectivity
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
Date: Sun, 21 Jul 2024 13:06 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: andrew@spam.net (Andrew)
Newsgroups: comp.mobile.android,alt.comp.os.windows-10,alt.comp.networking.connectivity
Subject: Re: What is using Android adb port 55555 and/or 5555 on Windows
Date: Sun, 21 Jul 2024 13:06:23 -0000 (UTC)
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID: <v7j14e$f8g$1@nnrp.usenet.blueworldhosting.com>
References: <v7dsbq$2jit$1@nnrp.usenet.blueworldhosting.com> <lg4aamFbavdU2@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 21 Jul 2024 13:06:23 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="15632"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: NewsTap/5.5 (iPad)
Cancel-Lock: sha1:qzynE9GcReVuzC4Bm6ZO8jGfMhE= sha256:c9dtncn95KwSthzcRTcSo9TmBLF7MNaV5frQ+CG5fi4=
sha1:9AyfUDGJF/nQu2jawxcGeLEjEA8= sha256:mMMLcecFlK++ScLyyADhfNKXfQYEepFzvjb2aUYCOug=
X-Face: VQ}*Ueh[4uTOa]Md([|$jb%rw~ksq}bzqA;z-.*8JM`4+zL[`N\ORHCI80}]}$]$e5]/i#v qdYsE`yh@ZL3L{H:So{yN)b=AZJtpaP98ch_4W}
View all headers

Arno Welzel wrote on Sun, 21 Jul 2024 13:39:04 +0200 :

>> Background:
>> 1. I boot up the PC & I use adb every day, all day, while I'm at home.
>> 2. My phone is always connected by USB or Wi-Fi over adb on Windows 10.
>> 3. Mostly I use adb to mirror Android onto Windows when I'm at my desk.
>
> Depending in your Windows version, you may use netstat in an
> administrative Windows console:
>
> netstat -anb
>
> This will show all open ports and the name of the process which opened
> it. The options used:
>
> a - all ports, including the ones which are listening for incoming
> connections
>
> n - do not try to resolve names for IP addresses
>
> b - show the name of the process which opened the port

Thanks Arno for your kind suggestion, which I've added to my syslog.
Win+R > syslog [Enter] <== syslog is in the AppPaths registry key

I've since rebooted, so whatever was holding on to 55555 has released.
Rebooting almost always, if not always works - which is why it's odd.

I ran the command without adb connections:
1. Win+R > netstat -anb [Ctrl+Shift+Enter] <== to open an admin window
2. netstat -anb | findstr 5555
3. Which reported:
TCP 127.0.0.1:55555 0.0.0.0:0 LISTENING

I ran the command with the phone connected by adb over USB:
C:\app\editor\android\scrcpy> scrcpy -s 192.168.1.4 <== mirrors Android
C:\app\editor\android\sndcpy <== this uses the PC's speakers instead
Waiting for device...
Performing Streamed Install
Success
32961
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.rom1v.sndcpy/.MainActivity }
Waiting for 0 seconds, press a key to continue ...
Playing audio...
C:\Windows\system32> netstat -anb | findstr 5555
TCP 127.0.0.1:11023 127.0.0.1:55555 ESTABLISHED
TCP 127.0.0.1:55555 0.0.0.0:0 LISTENING
TCP 127.0.0.1:55555 127.0.0.1:11012 TIME_WAIT
TCP 127.0.0.1:55555 127.0.0.1:11013 TIME_WAIT
TCP 127.0.0.1:55555 127.0.0.1:11014 TIME_WAIT
TCP 127.0.0.1:55555 127.0.0.1:11015 TIME_WAIT
TCP 127.0.0.1:55555 127.0.0.1:11016 TIME_WAIT
TCP 127.0.0.1:55555 127.0.0.1:11017 TIME_WAIT
TCP 127.0.0.1:55555 127.0.0.1:11019 TIME_WAIT
TCP 127.0.0.1:55555 127.0.0.1:11020 TIME_WAIT
TCP 127.0.0.1:55555 127.0.0.1:11021 TIME_WAIT
TCP 127.0.0.1:55555 127.0.0.1:11022 TIME_WAIT
TCP 127.0.0.1:55555 127.0.0.1:11023 ESTABLISHED
TCP 127.0.0.1:55555 127.0.0.1:11027 TIME_WAIT
TCP 127.0.0.1:55555 127.0.0.1:11028 TIME_WAIT

And I ran the command with the phone connected by adb over Wi-Fi
(using the Wireless Debugging Tile that came with Android 10+)
C:\app\editor\android\scrcpy> adb connect 192.168.1.4:42643
connected to 192.168.1.4:42643
C:\app\editor\android\scrcpy> scrcpy -s 192.168.1.4
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
C:\app\editor\android\scrcpy\scrcpy-server: 1 file pushed, 0 skipped. 25.0 MB/s (41159 bytes in 0.002s)
[server] INFO: Device: samsung SM-A326U (Android 13)
INFO: Renderer: direct3d
INFO: Initial texture: 720x1600
C:\Windows\system32> netstat -anb | findstr 5555
C:\Windows\system32> netstat -anb | findstr 5555
TCP 127.0.0.1:55555 0.0.0.0:0 LISTENING
TCP 127.0.0.1:55555 127.0.0.1:63998 ESTABLISHED
TCP 127.0.0.1:63998 127.0.0.1:55555 ESTABLISHED

The next time I get this adb error, I'll run that netstat command
as none of the commands above showed what it shows when adb is locked.
PORT STATE SERVICE REASON
55555/tcp closed unknown reset ttl 64

Much appreciated the kind help & advice even though I have no idea why the
netstat command is showing all those ports when I didn't open them myself.

Subject: Re: What is using Android adb port 55555 and/or 5555 on Windows
From: Andy Burns
Newsgroups: comp.mobile.android, alt.comp.os.windows-10, alt.comp.networking.connectivity
Date: Sun, 21 Jul 2024 13:44 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@andyburns.uk (Andy Burns)
Newsgroups: comp.mobile.android,alt.comp.os.windows-10,alt.comp.networking.connectivity
Subject: Re: What is using Android adb port 55555 and/or 5555 on Windows
Date: Sun, 21 Jul 2024 14:44:01 +0100
Lines: 9
Message-ID: <lg4hl3FccliU2@mid.individual.net>
References: <v7dsbq$2jit$1@nnrp.usenet.blueworldhosting.com>
<lg4aamFbavdU2@mid.individual.net>
<v7j14e$f8g$1@nnrp.usenet.blueworldhosting.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 55EBQ8bvtyqRYxkaT9La5gbJESxkz+1nAMGaC5csMIueS3Uo+a
Cancel-Lock: sha1:ZX7uHAhIEFe7899J1EoHcEsfV2Q= sha256:8uSaK3vFx7qgVRpfF4SqJvm+zbKf1htgncqNVzeh/cg=
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <v7j14e$f8g$1@nnrp.usenet.blueworldhosting.com>
View all headers

Andrew wrote:

> 2. netstat -anb | findstr 5555
> 3. Which reported:
> TCP 127.0.0.1:55555 0.0.0.0:0 LISTENING

Using findstr is not useful when using netstat -nb because the name of
executable is not on the same line of output as the port number you're
matching.

Subject: Re: What is using Android adb port 55555 and/or 5555 on Windows
From: Andrew
Newsgroups: comp.mobile.android, alt.comp.os.windows-10, alt.comp.networking.connectivity
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
Date: Sun, 21 Jul 2024 14:38 UTC
References: 1 2 3 4
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!news.gegeweb.eu!gegeweb.org!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: andrew@spam.net (Andrew)
Newsgroups: comp.mobile.android,alt.comp.os.windows-10,alt.comp.networking.connectivity
Subject: Re: What is using Android adb port 55555 and/or 5555 on Windows
Date: Sun, 21 Jul 2024 14:38:04 -0000 (UTC)
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID: <v7j6gb$gv5$1@nnrp.usenet.blueworldhosting.com>
References: <v7dsbq$2jit$1@nnrp.usenet.blueworldhosting.com> <lg4aamFbavdU2@mid.individual.net> <v7j14e$f8g$1@nnrp.usenet.blueworldhosting.com> <lg4hl3FccliU2@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 21 Jul 2024 14:38:04 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="17381"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: NewsTap/5.5 (iPad)
Cancel-Lock: sha1:8O3O9EosgJsSdrt29HaObVMoY/Q= sha256:S++WjQMFopAzWVp++YPQTYu6jqgupaXzIRMcUeuCbAk=
sha1:1NdhUXAnM5eQFhHGvAeCYakVWNc= sha256:VJ07sRVCwD8t1hULSqkV371jCjJF9/VBCzb9a6ejQyU=
X-Face: VQ}*Ueh[4uTOa]Md([|$jb%rw~ksq}bzqA;z-.*8JM`4+zL[`N\ORHCI80}]}$]$e5]/i#v qdYsE`yh@ZL3L{H:So{yN)b=AZJtpaP98ch_4W}
View all headers

Andy Burns wrote on Sun, 21 Jul 2024 14:44:01 +0100 :

>> 2. netstat -anb | findstr 5555
>> 3. Which reported:
>> TCP 127.0.0.1:55555 0.0.0.0:0 LISTENING
>
> Using findstr is not useful when using netstat -nb because the name of
> executable is not on the same line of output as the port number you're
> matching.

Good point. If it were Linux and not Windows, it would be easier
(as I learned UNIX well before Windows existed, like most of us here).

Long ago I had a syntax-correct example in both Linux & Window for
running grep/findstr that also did a cat/tail of a given number of lines
*after* the match - but I've lost that syntax in the ensuing years.

Looking it up, there are many people trying to reproduce grep on Windows,
and yes, like everyone, I've used the CYGWIN & WSL Frankenstein shells.
https://superuser.com/questions/300815/grep-equivalent-for-windows-7

Taking your kind & helpful advice into hand, what I'll do is pipe the
standard out results to a file and then I can search using Vim (which is my
default text editor since my finger memory has lasted for many decades).

Much appreciated.

Subject: Re: What is using Android adb port 55555 and/or 5555 on Windows
From: Andy Burns
Newsgroups: comp.mobile.android, alt.comp.os.windows-10, alt.comp.networking.connectivity
Date: Sun, 21 Jul 2024 15:34 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@andyburns.uk (Andy Burns)
Newsgroups: comp.mobile.android,alt.comp.os.windows-10,alt.comp.networking.connectivity
Subject: Re: What is using Android adb port 55555 and/or 5555 on Windows
Date: Sun, 21 Jul 2024 16:34:22 +0100
Lines: 8
Message-ID: <lg4o41Fdb6dU1@mid.individual.net>
References: <v7dsbq$2jit$1@nnrp.usenet.blueworldhosting.com>
<lg4aamFbavdU2@mid.individual.net>
<v7j14e$f8g$1@nnrp.usenet.blueworldhosting.com>
<lg4hl3FccliU2@mid.individual.net>
<v7j6gb$gv5$1@nnrp.usenet.blueworldhosting.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net rO03O1z/uEgY7TjM1XLxuwlfr5XNdLFtvqK6CR+M+biCSzgb+I
Cancel-Lock: sha1:j9fH4acnGQyZqYQ41GJkedOe01g= sha256:2dB6UltVSjXc98RHYLTUAoOSg6m9AFKpKD16HdaHQ38=
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <v7j6gb$gv5$1@nnrp.usenet.blueworldhosting.com>
View all headers

Andrew wrote:

> Looking it up, there are many people trying to reproduce grep on Windows

You can do it with powershell (still needs to be run as admin for the -b
option)

netstat -nb | select-string -pattern ":5555" -context 0,1

Subject: Re: What is using Android adb port 55555 and/or 5555 on Windows
From: Java Jive
Newsgroups: comp.mobile.android, alt.comp.os.windows-10, alt.comp.networking.connectivity
Organization: A noiseless patient Spider
Date: Sun, 21 Jul 2024 16:15 UTC
References: 1 2 3 4 5
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: java@evij.com.invalid (Java Jive)
Newsgroups: comp.mobile.android,alt.comp.os.windows-10,alt.comp.networking.connectivity
Subject: Re: What is using Android adb port 55555 and/or 5555 on Windows
Date: Sun, 21 Jul 2024 17:15:24 +0100
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <v7jc6t$5kc6$1@dont-email.me>
References: <v7dsbq$2jit$1@nnrp.usenet.blueworldhosting.com>
<lg4aamFbavdU2@mid.individual.net>
<v7j14e$f8g$1@nnrp.usenet.blueworldhosting.com>
<lg4hl3FccliU2@mid.individual.net>
<v7j6gb$gv5$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 21 Jul 2024 18:15:25 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d5644f57e04ed328768f6e40a7b23d3b";
logging-data="184710"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18R9lV//P/OLdK6BdD492hZ/+/QT6i9rO4="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101
Thunderbird/68.4.2
Cancel-Lock: sha1:VtFvnOAaC2rwgO31VEp9ZQMtQrI=
Content-Language: en-GB
In-Reply-To: <v7j6gb$gv5$1@nnrp.usenet.blueworldhosting.com>
View all headers

On 21/07/2024 15:38, Andrew wrote:
>
> Long ago I had a syntax-correct example in both Linux & Window for
> running grep/findstr that also did a cat/tail of a given number of lines
> *after* the match - but I've lost that syntax in the ensuing years.

Well, it's not exactly hard to find, just type ...
grep --help
.... and it's all there:
-B, --before-context=NUM print NUM lines of leading context
-A, --after-context=NUM print NUM lines of trailing context

--

Fake news kills!

I may be contacted via the contact address given on my website:
www.macfh.co.uk

1

rocksolid light 0.9.8
clearnet tor