tutorial

4

Shelling scripting is a necessary skill

http://bashcurescancer.com

Yesterday a 20 line shell script caught a race condition in one of software I work on. Our best engineers looked at the problem, a vendor case was filed, and there was thoughts of automatically restarted the application to fix the issue at hand.

In the end, a 20 line shell script to strace for file operations continuously provided the needed visibility into the issue at hand.

Update: The shell script.

The shell script itself, though trivial, is owned by the company I work for, but the basic concept was as follows:

#!/bin/bash


Read more »
Created by greenx 1 year 46 weeks ago – Made popular 1 year 46 weeks ago
Category: Tech   Tags:
2

Temporarily Clearing Environment Variables

http://bashcurescancer.com

After a long break I have some more ideas…. Will be posting them soon. For now, I leave you with a command to clear your current environment:

root@67 [~]# printenv | wc -l
26
root@67 [~]# env -i printenv | wc -l
0

This is very useful when you want to run a command ignoring any environment variables you have set. I use this command with curl nearly everyday to ignore the http_proxy environment variable I have set. Another, longer, option is:

root@67 [~]# http_proxy="" curl ....

I prefer env -i as its simpler.


Read more »
Created by uioloio 1 year 51 weeks ago – Made popular 1 year 51 weeks ago
Category: Tech   Tags:
31

Reading a file, line by line

http://bashcurescancer.com

nixcraft has a link on how to read a file line by line. The method is a great way to read a file, but there some trouble spots I thought I would point out.

In the script, the special variable IFS is set:

# set the Internal Field Separator to a pipe symbol
IFS='|'

The tells the read command to split “cyberciti.biz|74.86.48.99″ into “cyberciti.biz” and “74.86.48.99″ and thus fill both the domain and ip variables here:


Read more »
Created by shankar 1 year 51 weeks ago – Made popular 1 year 51 weeks ago
Category: Tech   Tags:
4

Splitting Strings Natively with the Shell: Native vs Native

http://bashcurescancer.com

Splitting Strings Natively with the Shell: Native vs Native

In my previous post on why to split strings with bash itself, I used set to split the string.


Read more »
Created by mr-Z 1 year 51 weeks ago – Made popular 1 year 51 weeks ago
Category: Tech   Tags:
28

Splitting Strings Natively with the Shell: Why

http://bashcurescancer.com

Today I want to discuss splitting strings into tokens or “words”. I previously discussed how to do this with the IFS variable and promised a more in depth discussion. Today, I will make the case on WHY to use IFS to split strings as opposed to using a subshell combined with awk or cut.


Read more »
Created by admin 1 year 51 weeks ago – Made popular 1 year 51 weeks ago
Category: Tech   Tags:
2

Nagios NRPE to Monitor Remote Linux Server

http://www.kernelhardware.org

story describes installation and configuration of Nagios for remote monitoring using nrpe

How do I monitor a remote linux system using Nagios
Solution / Answer:

Use th NRPE daemon to execute Nagios plugins on the remote server and report back to the monitoring host server.
NRPE Remote Server Installation and Setup


Read more »
Created by kelly 2 years 33 weeks ago – Made popular 2 years 33 weeks ago
Category: Utilities   Tags:
1

the ultimate linux beginners guide

http://www.handlewithlinux.com

A guide for beginning Linux if you have no experience and no knowledge whatsoever. Written in response to an article on the BBC website. Which is very negative about Linux, because the writer didn't know how to find information about a very strange thing he was trying.


Read more »
Created by j00p34 2 years 49 weeks ago – Made popular 2 years 49 weeks ago
Category: Linux News   Tags:
1

Linux cat Command beginners tutorial

http://beginnerlinuxtutorial.com

In this Linux tutorial you will learn how to use the Linux cat command. The Linux cat command is the Unix command to list a file’s contents onto your screen, or pass via pipeline to use with other Linux commands. The cat command comes from the word concatenate.


Read more »
Created by martin_d 2 years 51 weeks ago – Made popular 2 years 51 weeks ago
Category: Linux News   Tags:
7

Make your linux desktop look like a mac, so much better than windows look. This is so cool.

http://sourceforge.net

Want to make your linux desktop look like a mac? This is a tool which helps in the process.
If you want to see a full howto go to howtoforge:

http://www.howtoforge.com/mac4lin_make_linux_look_like_a_mac

Or go directly to it's download page:


Dismember-Me Plush Zombie


Read more »
Created by Anonymous 3 years 6 days ago – Made popular 3 years 6 days ago
Category: Utilities   Tags:
3

Asus U5F slackware

http://www.karlin.mff.cuni.cz

I've used this site to install slackware on my asus U5F.
I'd rate it at intermediate, not beginner user level if you intend to follow this tutorial.


Read more »
Created by Anonymous 3 years 2 weeks ago – Made popular 3 years 2 weeks ago
Category: Linux usability   Tags: