Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No operation command

With Bash, you have the command :

Null command.

No effect; the command does nothing.

Exit Status:
Always succeeds.

Example

: 'foo'

Does PowerShell have something similar to this?

like image 926
Zombo Avatar asked Oct 20 '22 04:10

Zombo


1 Answers

With the above example, the ForEach-Object alias % works

% 'foo'

Or

function : {}
: 'foo'

Or

[void] 'foo'

PowerShell Data Types

like image 66
Zombo Avatar answered Oct 23 '22 07:10

Zombo