DIFFERENCE BETWEEN POWERSHELL AND SHELL SCRIPTING – PART3

This blog is the continuation of my previous blog , where I have explained the difference between PowerShell and Shell Scripting through 5 different scenarios. Here , in this Blog , I will take few more commands and will show the difference between them. Consider one file in windows and one file in Linux with same Data. Print selected column of a fileWindows use below commands. Need to mention what all columns are required.$headers=@(“COL1″”COL2”) Use import csv command to display data for above mentioned headers.Import-Csv -Path .\PowerShell_Scripting.txt -Delimiter ‘|’ |…

Difference Between PowerShell and Shell Scripting – PART2

This blog is the continuation of my previous Blog, where I have explained the difference between PowerShell and Shell Scripting through 5 different scenarios. Here , in this Blog , I will take 5 more different commands and will show the difference between them.Consider one file in windows and one file in Linux with same Data. Clear the content of a fileWindows use “Clear-Content”Clear-Content .\PowerShell_Scripting.txt Linux uses “>” symbol to truncate or removing content of a file.>Linuxfile.txt Copy a file from one Location to anotherWindows uses “Copy-Item” command to remove…

Difference between Unix and PowerShell Commands

In this Blog, I will demonstrate the difference between Unix and PowerShell Commands. It will help all coders who works on Scripting Languages.Consider the one file in windows and one file in Linux with same data.See the below Image for the same. Find the Total Number of Records in a file . Linux uses “cat” and “wc -l” commandcat LinuxScripting.txt | wc -l Windows “Get-Content” and “Measure-Object” command. $File_count=Get-Content PowerShell_Scripting.txt |Measure-Object Read first n lines of a file Linux uses “cat” and “head” command.cat LinuxScripting.txt | head -3 Windows uses…