HIRO posted on 8月 20, 2008 23:27

この記事は以前 http://blog.hiros-dot.net/ に書いたものです。

PowerShellには「範囲演算子」と呼ばれる演算子があります。

範囲演算子とは2つのピリオド(..)で表し

範囲の開始値..範囲の終了値

のように記述します。

1..5

記述した場合は1から5までという意味になります。

下記は1から5まで繰り返し、その値を表示します。

PS > foreach ( $cnt in 1..5 )
>> {
>> Write-Host $cnt
>> }
>>
1
2
3
4
5

 


Posted in: PowerShell , PowerShell入門  Tags:

最新のブログ

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

コメントを書く


 

  Country flag

biuquote
  • コメント
  • プレビュー
Loading



Calendar

«  11月 2008  »
月曜火曜水曜木曜金曜土曜日曜
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567
View posts in large calendar

Recent Posts

Recent Comments

Banners

Theme Grabber
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008 PowerShell from Japan!!