Article View: alt.comp.os.windows-10
Article #1434Re: What does |> do?
From: Paul
Date: Fri, 27 Nov 2026 09:28
Date: Fri, 27 Nov 2026 09:28
52 lines
2561 bytes
2561 bytes
On Fri, 11/27/2026 2:33 AM, R.Wieser wrote: > Johan, > >> What does the |> do in command lines? > > The "|" redirects the output of the previous command (echo) to the next one, > the ">" redirect the output of the command it belongs to (in your case the > next one, findstr), > > Yes, the "<" and ">" may be used /before/ the command you want to redirect > the input for and/or output of. > > Regards, > Rudy Wieser > > @echo off setlocal set test1=abc set test2="abc" set test3="") set test4=")" set test5=abc")" set test6=xyzBETAzyx set test7="xyz BETA zyx" set test8=xyzBETAzyx")" set test9=xyzBETAzyx")" set test10="xyzbetazyx") set test11="xyzBETAzyx") for /l %%N in (1 1 11) do call :test test%%N exit /b :test variableName setlocal enableDelayedExpansion echo !%1!|>nul findstr /rx \".*BETA.*\") && set "result=PASS" || set "result=FAIL" echo %1 = !result!: !%1! exit /b ************************************************ The >nul sends the STDOUT of findstr to the bit bucket. The bat scriptor doesn't want it nearer the end where all that crap is located. The pipe symbol, pipes the STDOUT of the first command (which echoes a string) and it becomes the STDIN to findstr. It looks like a .bat file or something :-) Paul
Technical Details
Message-ID:
<11ebifj$1frq8$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<Sd8OS.7158$B3F4.2353@fx15.ams4> <11ebbof$1dfkk$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Paul <nospam@needed.invalid> Newsgroups: alt.comp.os.windows-11,alt.comp.os.windows-10 Subject: Re: What does |> do? Date: Fri, 27 Nov 2026 04:28:19 -0500 Organization: A noiseless patient Spider Lines: 52 Message-ID: <11ebifj$1frq8$1@dont-email.me> References: <Sd8OS.7158$B3F4.2353@fx15.ams4> <11ebbof$1dfkk$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Fri, 27 Nov 2026 09:28:20 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1568584"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/74m9OSjKWlXWxrGwnIGmxI0nWdEg14rs="; posting-host="d247342193af6837c868a2215f9390c5" User-Agent: THIS SPACE FOR RENT Cancel-Lock: sha1:HLjp5sTHZhg8F2wc41Mo0j/5zMM= sha256:UDoaN8rJodEtLQj7+mKQIF9BszPDTwhUWdJvBFduuD8= sha1:M4Lk4i1uiJ4dGDOr70TceTO7gn0= sha256:GBy2vEteU3SKq0XkAJCXHhY+u2TbO750S+XM/mpuing= Content-Language: en-US In-Reply-To: <11ebbof$1dfkk$1@dont-email.me>