Tag: tail

How to read file contents in PowerShell. How to save file contents to a variable

Table of contents How to read file contents and display them on the screen How to read a file and save it to a variable How to read multiple files with a single Get-Content command Using wildcards with file names in Get-Content How to read a specified number of lines from the beginning of a file How to read a...

Analogs of cat, tail, head and wc in PowerShell

How to pass the contents of a file to a cmdlet in PowerShell In this article, we will look at how to get the contents of a file and send it to a cmdlet for processing or for display on the screen. In Bash on Linux, when you need to pass data from a file, commands either work with standard...

How to remove the first line from a file on the command line. How to remove the first 2, 3 or any other number of lines from a file

To fix the error that I wrote about in the previous post, I needed to remove a single line from the files with the exported databases. Moreover, the size of some files exceeds 2 GB and this action must be repeated many times. If you try to open a 2 GB file in any text editor, you will see how...
Loading...
X