-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
hold-for-prWaiting - for PR mergeWaiting - for PR mergehold-for-releaseWaiting - for next releaseWaiting - for next releaseissue-doc-ideaIssue - request for new contentIssue - request for new content
Description
Prerequisites
- Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
- Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new
Get-Foo
cmdlet" instead of "New cmdlet."
Summary
Added new parameters to Set-Content/Add-Content cmdlets so a user can specify their own delimiters when writing to files.
We will need to document new parameters -Delimiter
and -NoTrailingDelimiter
parameters to show new behaviour.
Details
Example 1
Write contents to file using delimiters:
> "a", "b", "c" | Set-Content -Path test.txt -Delimiter ","
> cat ./test.txt
a,b,c,
Example 2
Write contents to file using comma delimiter and remove trailing delimiter:
> "a", "b", "c" | Set-Content -Path test.txt -Delimiter "," -NoTrailingDelimiter
> cat ./test.txt
a,b,c
Articles
- reference/7.5/Microsoft.PowerShell.Management/Set-Content.md
- reference/7.5/Microsoft.PowerShell.Management/Add-Content.md
Related Source Pull Requests
Related Source Issues
Metadata
Metadata
Assignees
Labels
hold-for-prWaiting - for PR mergeWaiting - for PR mergehold-for-releaseWaiting - for next releaseWaiting - for next releaseissue-doc-ideaIssue - request for new contentIssue - request for new content