• Home
  • About

Bash

Bash, Helpful Tools, System Administration

Access an APC AP5456 IP Gateway for Analog KVM in Linux

I recently wrote about running an ActiveX component without Internet Explorer. I used that technique to come up with a shell script front-end for downloading, unpacking and running an executable in Wine for accessing an APC IP KVM (model AP5456). Here is the results of that effort. At a minimum the script requires Wine and…

Bash

Bash Snippet: URL Encoding

One approach would be to encode everything, but the approach I took was to just encode things I thought might be problematic to pass over the query string. URL (a.k.a percent) encoding of a string in bash: urlencode () {         tab="`echo -en "\x9"`"         i="$@"      …

Bash

Bash Snippet: Calculating the Distance Between 2 Coordinates

I have a tendency to do things in bash that I’d probably be better off doing in perl or python. Although bash may have super powers, math is not one of them, and so like my last post this script also requires bc. I’ll try and keep these code snippet posts short and sweet, and…

Bash

Bash Snippet: HTML &#code; decoder

A short and simple way to decode HTML decimal (and hex) character codes in bash. html_decode () {     html_encoded="$1"     html_encoded=${html_encoded//&#/ }     html_encoded=(`echo $html_encoded`)     for html_dec in ${html_encoded[@]}     do         html_dec="${html_dec//X/x}"         html_dec="${html_dec//;/}"         if [ "${html_dec:0:1}"…

Posts pagination

PREV 1 2

Search