Add python.org, numpy.org and pandas to the URL list, then switch to Ubuntu: PowerShell 7.4 (pwsh) installed as a link in /opt/microsoft, running Linux commands and cmdlets side by side, comparing wc -l with Measure-Object, finding .ps1 files, and the Linux version of the script with a #!/usr/bin/env pwsh shebang, xdg-open and output sent to /dev/null.
Part 4 of 7 · PowerShell Automation (full course broken into short parts)
IN THIS PART
0: 00 Why this matters
0: 23 Swap google.com for python.org
0: 55 Add numpy.org
1: 24 pandas docs
1: 38 PowerShell on Ubuntu
2: 34 which pwsh
2: 48 pwsh –version: 7.4.2
3: 07 Linux commands inside PowerShell
3: 45 Get-Process and dir
4: 17 wc -l vs Measure-Object
5: 41 Lines, words and characters
6: 53 find -name *.ps1
8: 05 The Linux script
8: 51 #!/usr/bin/env pwsh
9: 50 xdg-open instead of Start-Process
11: 11 › /dev/null 2›&1
COMMANDS SHOWN
pwsh –version
ls -l | wc -l
dir | Measure-Object -Line
cat -n /etc/os-release | measure -Line -Word -Character
find . -name ‘*.ps1’
#!/usr/bin/env pwsh
xdg-open “$protocol$url” › /dev/null 2›&1
⬅ Previous: Part 3 – PowerShell as Admin: Install and Uninstall Modules, Docs, Get-Command and Aliases
➡ Next: Part 5 – Run the Automation on Linux, Debug a Page That Won’t Open and Install Chromium
▶ Watch the full video (all 7 parts in one): https://youtu.be/Wj33r7svyW4
📄 Free PDF notes for every part: https://www.MyWebUniversity.com/presentations/index.html
🌐 2,600+ free videos & 50,000+ searchable PDFs: https://www.MyWebUniversity.com
▶ English channel: https://www.youtube.com/@MyWebUniversity
▶ Dari channel: https://www.youtube.com/@MyWebUniversity-Dari
MyWebUniversity has offered free technical education since August 5, 2000: for girls denied schooling after 6th grade, and for every student who can’t afford tuition or books. Learn it, then pass it on. 🤲
#PowerShell #Automation #Scripting #Windows #MyWebUniversity
📘 My books, including “The Direct Path to Linux Ubuntu” (eBook, paperback and hardcover):
Amazon: https://www.amazon.com/s?k=Wahidullah+Lutfy
Barnes & Noble: https://www.barnesandnoble.com/search?q=Wahidullah%20Lutfy