Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

October 01 2011

moreutils

combine: combine the lines in two files using boolean operations ifdata: get network interface info without parsing ifconfig output ifne: run a program if the standard input is not empty isutf8: check if a file or standard input is utf-8 lckdo: execute a program with a lock held mispipe: pipe two commands, returning the exit status of the first parallel: run multiple jobs at once pee: tee standard input to pipes sponge: soak up standard input and write to a file ts: timestamp standard input vidir: edit a directory in your text editor vipe: insert a text editor into a pipe zrun: automatically uncompress arguments to command

moreutils

combine: combine the lines in two files using boolean operations ifdata: get network interface info without parsing ifconfig output ifne: run a program if the standard input is not empty isutf8: check if a file or standard input is utf-8 lckdo: execute a program with a lock held mispipe: pipe two commands, returning the exit status of the first parallel: run multiple jobs at once pee: tee standard input to pipes sponge: soak up standard input and write to a file ts: timestamp standard input vidir: edit a directory in your text editor vipe: insert a text editor into a pipe zrun: automatically uncompress arguments to command

July 21 2011

shocco.sh

shocco is a quick-and-dirty, literate-programming-style documentation generator written for and in POSIX shell. It borrows liberally from Docco, the original Q&D literate-programming-style doc generator.

shocco(1) reads shell scripts and produces annotated source documentation in HTML format. Comments are formatted with Markdown and presented alongside syntax highlighted code so as to give an annotation effect. This page is the result of running shocco against its own source file.

December 10 2010

How to Debug Bash Scripts | Ayman Hourieh

various techniques and tips for debugging Bash scripts.
Reposted byreturn13 return13

December 02 2010

Reference Cards

reference cards provide a useful summary of certain scripting concepts. The foregoing text treats these matters in more depth, as well as giving usage examples.

September 09 2010

Filenames in Shell

This little essay explains how to correctly process filenames in Bourne shells. I presume that you already know how to write Bourne shell scripts.

June 18 2010

May 26 2010

shflags - Project Hosting on Google Code

Shell Flags (shFlags) is a library written to greatly simplify the handling of command-line flags in Bourne based Unix shell scripts (bash, dash, ksh, sh, zsh) on many Unix OSes (Linux, Solaris, Mac OS X, etc.).

Most shell scripts use getopt for flags processing, but the different versions of getopt on various OSes make writing portable shell scripts difficult. shFlags instead provides an API that doesn't change across shell and OS versions so the script writer can be confident that the script will work.

August 05 2009

August 04 2009

Anton Olsen.com » Blog Archive » BASH: Split a string without ‘cut’ or ‘awk’

For a little test script I’m writing I needed to split a line on a ‘;’ but preservere the “s and ’s, something that echo doesn’t like to do. Digging deeper into the bash docs I see that there are some handy string handling functions. #!/bin/bash line=’this “is” a command;this “is” a pattern’ COMMAND=${line%;*} PATTERN=${line#*;} echo $COMMAND echo $PATTERN

July 07 2009

CLIapps

My effort to show that anything on the Desktop can be done in a console.

May 12 2009

May 04 2009

hubertf's NetBSD blog

NetBSD's systat(1) offers the -t option to switch to the display after a given number of cycles. I'd love to have something similar in screen(1), but couldn't find it from a brief RoTFM. As a result, I came up with the following line, which -- when ran inside a screen(1) session -- skips through screens 0 to 4: sh -c 'n=0; while true ; do echo n=$n ; screen -x -X select $n ; \ n=`expr $n + 1`; if [ $n = 4 ]; then n=0; fi ; sleep 5 ; done' This assumes that there are four screen sessions running. Determining the number of screen sessions actually running as well as skipping the one running this code is left as an exercise to the reader.
Tags: shell bash screen

April 09 2009

Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.

Don't be the product, buy the product!

Schweinderl