Librenix
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

No Starch Press has published my Perl One-Liners book!

Up
vote
Down

My Perl One-Liners book was just published by No Starch Press!

Perl one-liners are small and awesome Perl programs that fit in a single line of code. They do one thing really well—like changing line spacing, numbering lines, performing calculations, converting and substituting text, deleting and printing specific lines, parsing logs, editing files in-place, calculating statistics, carrying out system administration tasks, or updating a bunch of files at once. Perl one-liners will make you a shell warrior: what took you minutes (or even hours) to solve will now take you only seconds! read more...
mail this link | permapage | score:9986 | -pkrumins, March 24, 2014

Unix: Shell Script Wrapper Examples

Up
vote
Down

Shell script wrappers can make the *nix command more transparent to the user. The most common shell scripts are simple wrappers around third party or system binaries. A wrapper is nothing but a shell script that includes a system command or utility.

Linux and Unix like operating system can run both 32bit and 64bit specific versions of applications. You can write a wrapper script that can select and execute correct version on a 32bit or 64bit hardware platform. In cluster environment and High-Performance computing environment you may find 100s of wrapper scripts written in Perl, Shell, and Python to get cluster usage, setting up shared storage, submitting and managing jobs, backups, troubleshooting, invokes commands with specified arguments, sending stdout to stdout and stderr to stderr and much more.

In this post, I will explains how to create a shell wrapper to enhance the basic troubleshooting tool such as ping and host. read more...
mail this link | permapage | score:9697 | -nixcraft, June 24, 2012

OpenShift Online: a non-developer guide

Up
vote
Down

OpenShift Online is a developer-targeted service, but this article is aimed at non-developers, just to highlight the aspect of the service you can take advantage of. read more...
permapage | score:9686 | -finid, March 31, 2013

Tutorial: Create an NFS-like Storage Server with GlusterFS on Ubuntu 12.10

Up
vote
Down

This tutorial shows how to set up a standalone storage server on Ubuntu 12.10. Instead of NFS, I will use GlusterFS here. The client system will be able to access the storage as if it was a local filesystem. GlusterFS is a clustered file-system capable of scaling to several peta-bytes. It aggregates various storage bricks over Infiniband RDMA or TCP/IP interconnect into one large parallel network file system. Storage bricks can be made of any commodity hardware such as x86_64 servers with SATA-II RAID and Infiniband HBA. read more...
mail this link | permapage | score:9676 | -falko, January 16, 2013

Apache2, mod_rewrite tutorial: Redirect requests by device

Up
vote
Down

Since the massive rise of smartphones and tablets like the iPhone, iPad, Android phones and tablets, BlackBerries, etc. you might have considered creating a mobile version of your web site. This tutorial explains how to configure Apache to serve the mobile version of your web site if the visitor uses a mobile device, and the normal version if the visitor uses a normal desktop PC. This can be achieved with Apache's rewrite module. read more...
permapage | score:9584 | -falko, September 9, 2011

Install FB4Linux in Eclipse

Up
vote
Down

Flash development in Linux is often left to a generic text editor used with the free Flex SDK. It is certainly possible to code this way, but you do lose out on a lot of the functionality of a more specific IDE. The FB4Linux project provides a plugin for Eclipse that provides a similar environment to FlashBuilder 4. The only downside is that the installation instructions gloss over a few of the details required to get the plugin installed in Eclipse 3.5.2, which is the version of Eclipse that is available in the Ubuntu software repositories at the time of writing. This article shows you how to get FB4Linux up and running from start to finish. read more...
mail this link | permapage | score:9567 | -mcasperson, July 27, 2010

Better Grails apps with CSS

Up
vote
Down

This article focuses on dramatically changing the look and feel of a Grails application. With a few lines of CSS, you can change colors, fonts, and the spacing around block elements. Through partial templates and TagLibs, you can create some reusable snippets of code. In the end, you have all the benefits of the Grails framework and an application that has its very own look and feel, that looks nothing like an out-of-the-box Grails application you have ever seen.

(check out this dramatic canvas prints) read more...
mail this link | permapage | score:9541 | -solrac, January 22, 2009 (Updated: April 24, 2012)

Expect Script Examples

Up
vote
Down

Expressions, if statements, for loops, and while loops examples are covered in this mini-tutorial:
This article explains the following in the expect scripting language.
  • Expressions – arithmetic operation
  • if construct in expect
  • looping constructs
read more...
permapage | score:9519 | -Ray, January 21, 2011

perl1line.txt: A handy Perl script collection

Up
vote
Down

The ultimate goal of the Perl One-Liners Explained article series was to release the perl1line.txt file. Last week I finished the series and now I am happy to announce perl1line.txt - a collection of handy Perl one-liner scripts.

The perl1line.txt file contains over a hundred short Perl one-line scripts for various text processing tasks. The file processing tasks include: changing file spacing, numbering lines, doing calculations, creating strings and arrays, converting and substituting text, selective printing and deleting of certain lines and text filtering and modifications through regular expressions.

The latest version of perl1line.txt is always at:
http://www.catonmat.net/download/perl1line.txt
Enjoy! It took me over 3 years to write all the one-liners down. read more...
mail this link | permapage | score:9511 | -pkrumins, November 21, 2011

Perl One-Liners Explained: Handy Regular Expressions

Up
vote
Down

This is the seventh part of a nine-part article on Perl one-liners.

Perl one-liners are short programs that do one and only one task well and they fit on a single line in the shell.

Perl is not Perl without regular expressions, therefore in this part I come up with and explain various Perl regular expressions. Please see part one for the introduction of the series.

This part explains the following regular expressions:
  • Match something that looks like an IP address.
  • Test if a number is in range 0-255
  • Match an IP address
  • Check if the string looks like an email address
  • Check if the string is a decimal number
  • Check if a word appears twice in the string
  • Increase all numbers by one in the string
  • Extract HTTP User-Agent string from the HTTP headers
  • Match printable ASCII characters
  • Match text between two HTML tags
  • Replace all bold tags with strong tag
  • Extract all matches from a regular expression
read more...
mail this link | permapage | score:9488 | -pkrumins, November 11, 2011

Tutorial: Linux game programming with Ogre 3D

Up
vote
Down

This tutorial starts at the beginning with opening a window...
This tutorial series steps you through the process of creating a 3D shoot'em'up game using the popular and powerful Ogre 3D engine. The tutorials compile on both Windows and Linux.
read more...
permapage | score:9484 | -Ray, January 1, 2010

Tutorial: Build a C/C++ memory manager

Up
vote
Down

As a developer, one of the most powerful tools that C/C++ arms you with to improve processing time and prevent memory corruption is the control over how memory is allocated or deallocated in your code. This tutorial demystifies memory management concepts by telling you how to create your very own memory manager for specific situations. read more...
permapage | score:9477 | -BlueVoodoo, February 23, 2008

Using Git for Source Control

Up
vote
Down

GIT is the source control tool, a distributed version control system (dvcs) which is written in C. This provides a history of the files that are maintained by it. In distributed version control each user has a complete copy of the code so there is no central code repository. In this scenario an administrator makes changes, adds them to the index (called staging) and then adds them to the repository (called commit). Git will take this information and maintain a version history that users can track. This is all performed locally but could be synchronized with a remote repository. read more...
mail this link | permapage | score:9471 | -aweber, May 5, 2012

Add Video Streaming to C/C++ apps with Nex Gen Media Server API

Up
vote
Down

Recently I took a closer look at Nex Gen Media Server and their API framework. NGMS is a multi-purpose streaming server which supports some of the popular streaming protocols such as RTSP, RTMP, Apple's HTTP Live, and MPEG-2 Transport Stream. NGMS comes with transcoding support and is able to capture and reformat live video streams and adapt them to be received by another type of device, such as capturing an HD video feed and converting it to be received by an iPhone over 3g. My focus was to integrate the NGMS API to control the streaming features directly from my own C application. In this example I am using Ubuntu Linux 10.04. read more...
mail this link | permapage | score:9467 | -falko, November 17, 2011

Python Client/Server Tutorial

Up
vote
Down

A tiny Python tutorial...
This application can easily be coded in Python with performance levels of thousands of transactions per second on a desktop PC. Simple sample programs for the server and client sides are listed below, with discussions following
read more...
permapage | score:9455 | -Ray, June 22, 2009

DWR Java Ajax: User Interface (pdf)

Up
vote
Down

Caution: this article is in PDF format. -Ed.

In this article, the author of the book DWR Java Ajax Application shows how to develop samples based on DWR, which demonstrate how to dynamically change the common user interface elements such as tables, lists, and field completion. It also covers steps to make a dynamic user interface skeleton for these samples.

The section on dynamic user interfaces shows how to get started with a DWR application, and it presents a user interface skeleton that will be used to hold the tables and lists sample, and the field completion sample.

The article is divided into the following three sections:

  • Creating a Dynamic User Interface—starts with creating a web project and a basis for samples mentioned in this chapter
  • Implementing Tables and Lists—shows us how to use DWR with them
  • Implementing Field Completion—has a sample for typical field completion
read more...
mail this link | permapage | score:9443 | -Niraja Mulye, December 30, 2008

Detailed Error Handling In Bash

Up
vote
Down

Shell scripts are often running as background processes, doing useful things without running in a visible shell. To write such scripts can be quite painful, as all errors occur out of sight as well. While log files can hold a lot of information, finding the relevant information is a bit trickier. My solution is to log only the errors with all the details to a small database. This database contains tables for the message, the corresponding stack trace and the important environment variables. I have chosen for an SQLite database in this howto, but the same principle works with other databases as well. read more...
mail this link | permapage | score:9432 | -falko, February 21, 2013

Introduction to Perl one-liners

Up
vote
Down

Perl one-liners are small and awesome Perl programs that fit in a single line of code and they do one thing really well. These things include changing line spacing, numbering lines, doing calculations, converting and substituting text, deleting and printing certain lines, parsing logs, editing files in-place, doing statistics, carrying out system administration tasks, updating a bunch of files at once, and many more. Perl one-liners will make you the shell warrior. Anything that took you minutes to solve, will now take you seconds! read more...
mail this link | permapage | score:9422 | -pkrumins, May 28, 2012

Pattern matching in shell scripting

Up
vote
Down

This article is excerpted from the book Beginning Portable Shell Scripting.
Shell programming is heavily dependent on string processing. The term string is used generically to refer to any sequence of characters; typical examples of strings might be a line of input or a single argument to a command. Users enter responses to prompts, file names are generated, and commands produce output. Recurring throughout this is the need to determine whether a given string conforms to a given pattern; this process is called pattern matching. The shell has a fair amount of built-in pattern matching functionality.
read more...
mail this link | permapage | score:9403 | -Ray, January 1, 2009

Develop your own Raspberry Pi OS

Up
vote
Down

Why use an existing operating system if you can bake your own? Well, for one thing, writing an OS is not an easy feat. It requires a lot of knowledge in a lot of areas regarding OS development. read more...
permapage | score:9367 | -finid, September 7, 2012
More coding articles...
Buy Abstract Art Prints

coding headlines

More CommandLineFu One-Liners Explained

Tutorial: Android app build environment with Eclipse, PhoneGap (Ubuntu 11.04)

Tutorial: Creating graphics with PHP

e-book: Sed One-Liners Explained

Open source Cloud Computing with PHP and MySQL

Space Tyrant Index Page: Linux game server development project

Linux Kernel Debugging Tools

Tutorial: Build an Arduino laser game

Import XML into OpenOffice Calc with XSLT

Vim Plugins: matchit.vim

Dojo for Java programmers

Forking vs. Threading

Unix signals list

Scripting: Bash Array Tutorial

Tutorial: Linux Dialog Boxes

perl dispatch table examples

Sed One-Liners Explained

Programming the Sony PS3 SPE cores under Linux

E-book: Perl One-Liners Explained

Debugging Shell Scripts

JSEclipse Tutorial: A JavaScript Eclipse Tool

PowerPC assembly language

Vim plugins: snipmate.vim

Space Tyrant: Multithreading lessons learned on SMP hardware

Online Ruby Interpreter

Porting C / C++ code from Windows to Linux / Unix

Build Apps with Android SDK, Eclipse, PhoneGap (Ubuntu 10.10)

Introduction to Java programming

Space Tyrant: A multiplayer network game for Linux

Mono-culture and the .NETwork effect

Space Tyrant: A threaded game server project in C

Eclipse: Use gdb from CDT

Scripting: Put a clock in your bash terminal

Tutorial: UDP socket based client server C programs

String matching in regular expressions

I wrote my first programming e-book: Awk One-Liners Explained

Java: Real numbers

Space Tyrant: A threaded C game project: First Code

Tutorial: MySQL Select statement

Tutorial: Android development environment on Fedora 14

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

 
Articles are owned by their authors.   © 2000-2012 Ray Yeargin