< Back
Remove-EmptyLines
Post
NAME Remove-EmptyLines
SYNOPSIS
Remove empty lines from file, string or variable
SYNTAX
Remove-EmptyLines [[-in] <Array>] [<CommonParameters>]
DESCRIPTION
Remove empty lines from file, string or variable
PARAMETERS
-in <Array>
Required? false
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove-EmptyLines -in (gc c:\\file.txt)
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$var | Remove-EmptyLines
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>help -ex Remove-EmptyLines | Remove-EmptyLines
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>gc c:\\*.txt | rmel
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>Get-ClipBoard | rmel
-------------------------- EXAMPLE 6 --------------------------
PS C:\\>dir | oss | rmel
RELATED LINKS
SYNOPSIS
Remove empty lines from file, string or variable
SYNTAX
Remove-EmptyLines [[-in] <Array>] [<CommonParameters>]
DESCRIPTION
Remove empty lines from file, string or variable
PARAMETERS
-in <Array>
Required? false
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Remove-EmptyLines -in (gc c:\\file.txt)
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$var | Remove-EmptyLines
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>help -ex Remove-EmptyLines | Remove-EmptyLines
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>gc c:\\*.txt | rmel
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>Get-ClipBoard | rmel
-------------------------- EXAMPLE 6 --------------------------
PS C:\\>dir | oss | rmel
RELATED LINKS