Intro to Linux Scripting

One HUGE thing that has helped me out in my my career has been Linux scripting, and no I am not a Linux administrator for my day job though I do have a few Linux servers I manage (one of them powers this website). I work as a Networking Infrastructure Administrator at a hospital, so I work with the routers, switches, and firewalls of the organization. Now at first glance you wouldn’t think that I would need to know much for Linux scripting in that roll and the truth is you don’t unless you want to most of the time, but in my case when I was in school we had to take a Linux course and scripting was a huge part of that and ever since that class I have played with the Linux cli and have grown to enjoy that. I stumbled across a program called MobaXterm it is an SSH manager which is vital to me keeping track of the network¬† devices but it is much more than that. It uses a plugin that interfaces with Cygwin which for those of you who do not know allows you to run Linux utilities like grep, sed, and awk on a Windows machine, though it is not native, all of this comes in the MobaXterm package so I purchased it for myself and started playing and was very surprised on how very similar it is to the Linux command like and I was even more pleased to find that if a utility was missing i could just type ‘apt-get $PACKAGENAME’ and get the utility i needed and it functioned very similarly to how it would on a regular Linux machine with the exception of a few that are rarely used don’t work at all. So that is how Linux shell scripts have crept in to things I use on a daily basis.

Now the way I do it 90% of the time is not in its truest form because I utilize MobaXterm to plugin to Cygwin on a Windows computer so I cant do things with scripts like cause them to run on startup with cron etc but I do get access to my hard drive and network drives and get direct network access so all of that preforms very close to normal.

To come full circle a lot of the scripts I write now are ran on my current setup but are typically portable to a Linux machine and the only things that need changing are things like file paths etc. That being said I do plan to keep things relatively simple at the beginning so we shouldn’t run into situations very often which require me to distinguish the way something is done because of my setup. And really scripting in any language fluently is just an awesome thing to learn because you will look really awesome when a company is looking at some software that costs 5 figures for just a few features when you can write a bash script in an hour or a collection of scripts in a few days time to do what you need to accomplish

If there is anything that I don’t cover in my series of Linux scripting posts and you want me to or have extra questions on things just let me know.

Be the first to comment

Leave a Reply

Your email address will not be published.