&&
is notoriously hard to search for on Google Search, but the best I've found is this article which says to use -and
.
Unfortunately it doesn't give any more information, and I can't find out what I'm supposed to do with -and
(again, a notoriously hard thing to search for).
The context I'm trying to use it in is "execute cmd1, and if successful, execute cmd2", basically this:
csc /t:exe /out:a.exe SomeFile.cs && a.exe
If you just want to run multiple commands on a single line and you don't care if the first one fails or not, you can use ;
For most of my purposes this is fine.
For example: kill -n myapp; ./myapp.exe
.
!sym
. – nisavid&&
and||
! Weigh in at the GitHub PR – pilau&&
and||
are implemented. They are called "pipeline chain operators". docs.microsoft.com/en-us/powershell/module/… – Tomoyuki Aota