Archive for November, 2008

Process wait script

 
Often times I would run commands that depended on processes to finish on another tab within a screen session.  Unfortunately, bash’s wait command only works within the existing shell, so I came up with a quick script to check versus executable name.
#!/bin/bash

if [ $# -ne 0 ]; then
    while pgrep ^$1 > /dev/null; do sleep [...]