LowEndBox - Cheap VPS, Hosting and Dedicated Server Deals

Here Today, Gone When You Exit: Proper Tempfiles in Shell Scripts

Tags: , , , , Date/Time: April 9, 2022 @ 2:53 pm, by raindog308

In the course of my career, I’ve periodically come across code like this in shell scripts: TEMP_FILE=/tmp/tempfile Or sometimes, slightly more elegantly: TEMPFILE=/tmp/tempfile.$$ The problems with the first example are obvious, especially if it appears in many different scripts.  The second is better.  The “$$” means “my process ID”, who if whatever script had a […]

Using the imgbb.com API for Easy Command-Line Image Hosting

Tags: , , , , Date/Time: May 25, 2021 @ 1:14 am, by raindog308

Like many of my fellow LowendTalk readers, I sometimes post images on LET and other boards.  To do that, I need an image hosting service.  Going through the work of logging into a web page, uploading through their interface, etc. is tedious.  Wouldn’t it be better to do it with an easy command-line script?  Indeed, […]

Top Ten Things That Should Be In Your Dot Files

Tags: , , , , , , , Date/Time: October 13, 2020 @ 6:49 am, by raindog308

“Dot files” are Unix configuration files that live in your home directory.  They’re often used to store user-specific choices and preferences.  For example: .bash_profile is executed whenever you login via ssh (or any other method).  It is typically used to control your Unix shell experience. .vimrc contains customizations for the Vim editor, while .emacs contains […]

Replacing Big Fat Bash with Dash for Scripting

Tags: , Date/Time: March 15, 2009 @ 11:15 pm, by LowEndAdmin

A while a go I looked at Bash replacements for interactive shells. Unfortunately for me, I am just getting too used to having Bash on the command line and can’t get myself used to other shells. However, interactive shell is one thing, and scripting shell is another. If your scripts are compatible with the original […]

Replacing That Big Fat Bash

Tags: , , , Date/Time: February 9, 2009 @ 1:31 am, by LowEndAdmin

It’s actually a tip from Lincoln, who emailed me last month: Another idea is to replace bash (~4M/instance) with pdksh (~1M/instance). It doesn’t sound like much, but if you’re like me and you’re have a half-dozen or more concurrent ssh sessions, plus you’re su’ed on a couple of them, etc… it can be a significant […]