Horje
powershell for each loop Code Example
powershell Foreach
$Items = "A", "B", "C"
#There are 2 ways to do this.
#The Foreach Keyword
foreach ($item in $items) {
	Write-host $Item
}
#OR By Piping 
#$_ is a dedicated varible for the object in the Pipe
$Items | Foreach-Object {
	Write-host $_
}
powershell for each loop
> $array = @("item1", "item2", "item3")
 
> foreach ($element in $array) { $element }
item1
item2
item3
 
> $array | foreach { $_ }
item1
item2
item3




Shell

Related
sed digits Code Example sed digits Code Example
laravel install lysystem-aws-s3 Code Example laravel install lysystem-aws-s3 Code Example
ubuntu sources.list path Code Example ubuntu sources.list path Code Example
AVCONV linux how to install Code Example AVCONV linux how to install Code Example
set gunicorn timeout via command Code Example set gunicorn timeout via command Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9