Translate

Archives

Inline Comments in Multiline PowerShell Commands and Scripts

Questions about the use of line continuation (\) together with inline comments (# comment) in shell scripts is a somewhat frequent topic on Unix and Linux forums. Unfortunately, there is no simple elegant solutions available for any of the standard shells such as bash, ksh93, zsh or the POSIX shell. Consider the following simple shell script: #!/bin/ksh93 find ./ \ -type f \ -name “*.pyc” Suppose you want to add comments describing each argument to the find utility. You might (I did the first time I came across this issue!) naively expect the following to work: #!/bin/ksh93 find ./ \

Adeau zurlinux.com

I have decided to close down zurlinux.com and move all its content to this website.

Dynamically Updating Xterm Title using Ksh93

In this post, I show you how to use a discipline function dynamically customize the title of your xterm window and your shell prompt

My thoughts on Docker, i.e. Linux Containers

Docker is an open-source project, started by Solomon Hykes of dotCloud, that automates the packaging of an application and its dependencies, and the deployment of such applications inside software containers on a Linux kernel. Currently the technology is being strongly pushed by the Linux community and especially by Red Hat. Unlike hypervisor-based virtual machines, a Docker container does not include the kernel or all the operating system libraries, shells and utilities. Instead, it relies on functionality in the Linux kernel (cgroups, LXC, etc.) to provide resource and namespace isolation. In many ways this is similar to the older Oracle Solaris

GNU Coreutils Epoch Date Support

GNU coreutils 5.3.0 added the very useful @ operator to the date command to enable users to easily convert seconds since the Unix Epoch into date strings. $ date Mon Mar 17 21:31:15 EDT 2014 $ date +%s 1395106277 $ date -d’@1395106277′ Mon Mar 17 21:31:17 EDT 2014 $ date –date=’@1395106277′ Mon Mar 17 21:31:17 EDT 2014 $