It works like magic, but it works - Bring your aliasing to a whole other level!
A deep dive into aliasing with PowerShell
Why installing PowerShell on Windows may actually be a good idea
Randomize Collections in PowerShell
Script to analyze your PowerShell history
How to show process names in netstat on Windows
Diff different data types in PowerShell
Filtering data, from log or config files to data returned by an api, is an important operation to remove noise from it and make further analysis possible. In Bash most would gravitate towards grep, egrep or awk. Classic examples would be looking at your history $ history | grep ssh ssh email@example.com ssh firstname.lastname@example.org ssh email@example.com looking for errors in a log $ cat /var/log/app.log | grep error 2020-09-30 09:01:17 error: twitter api responded with 403 2020-09-30 09:16:05 error: secret plan to take over the world failed grep $ grep api app....
Printing the last or first, few lines of a file is a common operation in day to day operations. On Linux most people will, without thinking twice, use tail and it’s counterpart head to achieve this. It’s man page1 describes tail simply like this Print the last 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name....
Whats the first thing coming to mind when seeing a command line? For most people it is Linux, be it Ubuntu, Debian or RedHat. And it is completely understandable. A big part of our industry has a background in Linux and sees it as the superior system for quick scripts and the like. In this series I want to challenge this notion. PowerShell can compete with, an in some cases outperform, the quick scripts and common daily tasks done in Linux shells....