Chomping using sed

${array[$i]} = /export/home

Trying to get rid of the initial "/"

chomped_array=`sed 's///^ /g' ${array[$i]}`
chomped_array=`sed 's////g' ${array[$i]}`
chomped_array=`sed 's////g' "${array[$i]}"`

Can't seem to get it right... the output is always

"First RE may not be null"

Thanks in advance. I hope someone can shed some light on this. I'm still new to sed.

sed 's#^/##'

Another one,

echo "/export/home" | sed 's!/\(.*\)!\1!'
chomp_array=`${array[$i]#/}`

cheers,
Devaraj Takhellambam

Try this,

echo "/export/home"  | sed -e "s/^\///g"