「PowerShell」文字列リテラルを使うサンプル

構文
$変数名 ="AA"
$変数名=’BB’
サンプルコード

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
#ダブルクォーテーション
$cftA ="study skill in arkgame.com"
#シングルクォーテーション
$cftB ='it skill is more'
$cftC = " think and do "
echo "welcome you $cftA"
echo "$cftA $cftB"
echo "have a dream $cftC"
#ダブルクォーテーション $cftA ="study skill in arkgame.com" #シングルクォーテーション $cftB ='it skill is more' $cftC = " think and do " echo "welcome you $cftA" echo "$cftA $cftB" echo "have a dream $cftC"
#ダブルクォーテーション
$cftA ="study skill in arkgame.com"
#シングルクォーテーション
$cftB ='it skill is more'

$cftC = " think and do "

echo "welcome you $cftA"

echo "$cftA $cftB"

echo "have a dream $cftC"

実行結果
> .\test.ps1
welcome you study skill in arkgame.com
study skill in arkgame.com it skill is more
have a dream think and do

PowerShell

Posted by arkgame