The && operator in unix comes between 2 commands. It means “if command1 succeeds then do command2.” A syntax is “command1 && command2”. So if command1 fails then command2 does not execute. This week I found this operator works on both Windows 10 and 11 machines in a cmd.exe box. Try this example: “dir dir1 && dir dir2” to show the contents of 2 directories.
Windows 10 & 11 now supports && operator
Windows 10 & 11 now supports && operator
Windows 10 & 11 now supports && operator
The && operator in unix comes between 2 commands. It means “if command1 succeeds then do command2.” A syntax is “command1 && command2”. So if command1 fails then command2 does not execute. This week I found this operator works on both Windows 10 and 11 machines in a cmd.exe box. Try this example: “dir dir1 && dir dir2” to show the contents of 2 directories.