Ubuntu 12.04.1 LTS
GNU bash, version 4.2.24(1)-release (x86_64-pc-linux-gnu)


I'm looking to replace '/' with '-'

why is output 11-/11-/2012 and not 11-11-2012?


#!/bin/bash
a=11/11/2012
b=${a//\//-/}
echo $a $b
exit

OUTPUT:
11/11/2012 11-/11-/2012