alexsanford/Tmux-backup — pull request #2 by marczych (2014-02-02 22:11:03+00:00)
Title: Fix window list

The `if [ ${i} -ne ${window} ]` check was failing because `${window}` was `0-name`. Here are various commands that led me to replacing `cut` with `sed`:

```bash
┌─[mzych@marcs-air] - [~/dotfiles] - [Sun Feb 02, 02:03:34]
└─[N]> ls ~/.tmux_resurrect/snapshot
test.size test:0-name test:0.0 test:0.1 test:0.layout
┌─[mzych@marcs-air] - [~/dotfiles] - [Sun Feb 02, 02:03:53]
└─[N]> ls ~/.tmux_resurrect/snapshot | awk -F: '/^'test':/ {print $2}' | cut -d\. -f1
0-name
0
0
0
┌─[mzych@marcs-air] - [~/dotfiles] - [Sun Feb 02, 02:04:03]
└─[N]> ls ~/.tmux_resurrect/snapshot | awk -F: '/^'test':/ {print $2}' | cut -d\. -f1 | sort -nu
0-name
┌─[mzych@marcs-air] - [~/dotfiles] - [Sun Feb 02, 02:04:15]
└─[I]> ls ~/.tmux_resurrect/snapshot | awk -F: '/^'test':/ {print $2}' | sed 's/^\([0-9]*\).*/\1/' | sort -nu
0```