I.T. Security and Linux Administration:

bash scripting

1

September 7, 2011  4:31 PM

Shell Scripting tip



Posted by: Eric Hansen
Bash, bash scripting

While for the most part you may never run into an issue when writing (and using) shell scripts, there's one little caveat that I've experienced as of late. Instead of starting your scripts with this:

#!/bin/sh
You will most likely better off in the long run specifying...

August 8, 2011  12:07 PM

[Script] iptables Helper



Posted by: Eric Hansen
bash scripting, iptables

After messing around with the elusive...


June 29, 2011  11:46 AM

New checksum method



Posted by: Eric Hansen
bash scripting, Checksum, linux

I got an interesting article in my inbox today in regards to using extended attributes to create checksums. While I don't know if this will pick up to be a de facto standard way of distributing checksums, this is definitely a step in the right direction.


June 24, 2011  2:51 PM

Simple battery check script



Posted by: Eric Hansen
bash scripting, battery, check

Like most people, I have Linux installed on my laptop. However, with the way I have it set up, I don't have a readily-available battery monitoring widget/app/etc... to tell me when my battery's going to die. Even though my laptop is almost always on the charger now, I still decided to cook up a...


May 20, 2011  10:10 AM

Mass process kill using Bash, ps, and awk



Posted by: Eric Hansen
awk, bash scripting, kill, process, ps

I've been looking for something like this for a while, and have never seen it. I know it exists somewhere, as does most things these days, but I was too lazy to search through the archives of Google, and wrote a script myself. What this does is take each line of the output from ps, and sends a...


March 3, 2011  2:18 PM

Nagios Checker [Bash Script]



Posted by: Eric Hansen
bash scripting, Nagios

While working on another post I'll be making here later, I decided to venture back into bash scripting.  While there's plenty enough Nagios scripts out there I'm sure (I really haven't looked myself, but Nagios does have a big enough community), I decided to write my own, basic one.  The only...


July 11, 2010  7:16 AM

Side note and beginner guide 101 (part 1)



Posted by: Eric Hansen
bash scripting, beginner, cli, system administration, tips

First off, I'm just going to say I'm proud to announce the fact that people are starting to notice this blog (see http://www.linuxaffinity.com/?p=19692 ). Now, for another Linux tip...don't use Simple Script!!! Just playing (although, it does cause more issues than if you were to install any of...


July 4, 2010  2:09 PM

.bashrc, meet SSH…aka: recovery-godsend



Posted by: Eric Hansen
.bashrc, alias, bash scripting

I have SSH access for both my home network, and my work.  The idea to implement this came from the fact my work actually does this already.  Instead of typing ssh <commands> you just type na <hostname/ip> and it'll do the dirty work for you.  At first, I thought the "na" command was...


May 28, 2010  6:47 PM

Port Checker



Posted by: Eric Hansen
bash scripting, check, port

A while ago, I got bored and decided to venture into the realm of scripting.  Managing server after server, typing "netstat -ntlup | grep..." got annoying after a while, so I decided to write this. The script requires the runner/user to be root.  Which is flawed, I know, but this works for...


1

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: