Skip to content

krymtkts/Get-GzipContent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get-GzipContent

PowerShell Gallery

Gets the content of the gzip archive at the specified location. like zcat.

Usage

The Get-GzipContent gets the content of gzip archive at the location specified by the path. Get-GzipContent uses default text encoding to output.

Get the content of archive.gz

Get-GzipContent -Path .\archive.gz

Path parameter supports value from pipeline.

Get-ChildItem -Path 'file*.gz' | Get-GzipContent

Assigned alias is zcat. Get-GzipContent splits output content by value of Delimiter option.

ls *.gz | zcat | select -Skip 2 -First 10

Default value of Delimiter option is the value of System.Environment.NewLine property.

Installation

1. Get module

Installing via PowerShellGet

Get-GzipContent is available on the PowerShell Gallery. You can install using the PowerShellGet module.

PowerShell Gallery | Get-GzipContent

Install-Module Get-GzipContent

Clone the repository

Clone the repository to your PowerShell module path. Check your module paths by executing $env:PSModulePath.

Sample command is below.

cd ($env:PSModulePath -split ';')[0]
git clone https://github.com/krymtkts/Get-GzipContent

2. Import module

The command is below. Add -Force parameter when you update module.

Import-Module -Name Get-GzipContent

Add Import-Module to your profile if you want. Check your profile by executing $profile.