79 lines
3.3 KiB
HTML
79 lines
3.3 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml"><head>
|
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<link rel="stylesheet" href="main.css" type="text/css" />
|
|
<link rel="stylesheet" href="blog.css" type="text/css" />
|
|
<link rel="alternate" type="application/rss+xml" title="Subscribe to this page..." href="feed.rss" />
|
|
<title>Replacing bash scripting with powershell</title>
|
|
</head><body>
|
|
<div id="divbodyholder">
|
|
<div class="headerholder"><div class="header">
|
|
<div id="title">
|
|
<h1 class="nomargin"><a class="ablack" href="http://zigford.org/index.html">zigford.org</a></h1>
|
|
<div id="description"><a href="about.html">About</a><a href="links.html"> | Links</a><a href="scripts.html"> | Scripts</a><br>Sharing linux/windows scripts and tips</br></div>
|
|
</div></div></div>
|
|
<div id="divbody"><div class="content">
|
|
<!-- entry begin -->
|
|
<h3><a class="ablack" href="replacing-bash-scripting-with-powershell.html">
|
|
Replacing bash scripting with powershell
|
|
</a></h3>
|
|
<!-- bashblog_timestamp: #201809042235.22# -->
|
|
<div class="subtitle">September 04, 2018 —
|
|
Jesse Harris
|
|
</div>
|
|
<!-- text begin -->
|
|
|
|
<p><a href="https://github.com/ninjaaron/replacing-bash-scripting-with-python">This</a> article on replacing bash scripting with python was being shared
|
|
around on twitter today.</p>
|
|
|
|
<blockquote>
|
|
<p>The problem is if you want to do basically anything else, e.g. write logic,
|
|
use control structures, handle complex data... You're going to have big
|
|
problems. When Bash is coordinating external programs, it's fantastic. When
|
|
it's doing any work whatsoever itself, it disintegrates into a pile of
|
|
garbage.</p>
|
|
</blockquote>
|
|
|
|
<p>To me, this is what is awesome about PowerShell. I feel like it gets the shell
|
|
part right, and also supports sane logic, data structures and so on. Sticking
|
|
to the same language for quick system admin tasks and for longer form script
|
|
writing really helps learn the ins-and-outs of a language.</p>
|
|
|
|
<p>As for python, I have started writing some of my regular tools for use on
|
|
linux in python and so far it just doesn't seem as natural as powershell,
|
|
although that could just be because powershell is like muscle memory for me.</p>
|
|
|
|
<p>I'd love to give powershell a better chance on linux, but, it is a bit slow
|
|
to spin up on the <a href="raspberry-pi.html">raspberry pi</a> and not available
|
|
everywhere. For instance to use it on Gentoo, I've got it installed as a snap.</p>
|
|
|
|
<p>If you have any comments or feedback, please <a href="mailto:jesse@zigford.org">email</a>
|
|
me and let me know if you will allow your feedback to be posted here.</p>
|
|
|
|
<p>Tags: <a href='tag_shells.html'>shells</a>, <a href='tag_bash.html'>bash</a>, <a href='tag_python.html'>python</a>, <a href='tag_scripting.html'>scripting</a>, <a href='tag_powershell.html'>powershell</a></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- text end -->
|
|
<!-- entry end -->
|
|
</div>
|
|
<div id="footer">© <a href="http://twitter.com/zigford_org">Jesse Harris</a> — <a href="mailto:jesse@zigford.org">jesse@zigford.org</a><br/>
|
|
Generated with <a href="https://github.com/cfenollosa/bashblog">bashblog</a>, a single bash script to easily create blogs like this one</div>
|
|
</div></div>
|
|
</body></html>
|