Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Аватара для YuS_2

Crazy


Contributor


Сообщения: 1234
Благодарности: 517

Профиль | Отправить PM | Цитировать


Цитата Griboed0ff:
$ofs="" »
автоматическая переменная, имеющая значение по умолчанию:
Цитата:
$OFS
$OFS is a special variable that stores a string that you want to use as an output field separator. Use this variable when you are converting an array to a string. By default, the value of $OFS is " ", but you can change the value of $OFS in your session, by typing $OFS="<value>". If you are expecting the default value of " " in your script, module, or configuration output, be careful that the $OFS default value has not been changed elsewhere in your code.
Examples:
PS> $a="1","2","3","4"
PS> $a
1
2
3
4

PS> [string]$a
1 2 3 4
PS> $OFS="";[string]$a
1234

PS> $OFS=",";[string]$a
1,2,3,4

PS> $OFS="--PowerShellRocks--";[string]$a
1--PowerShellRocks--2--PowerShellRocks--3--PowerShellRocks--4
PS> $OFS="`n`n";[string]$a
1

2

3

4

-------
scio me nihil scire. Ѫ

Это сообщение посчитали полезным следующие участники:

Отправлено: 08:48, 18-04-2020 | #14