AWK split string then deliminate it as well -
need splitting below.
100gb@sdb,100gb@sdc
into this
sdb sdc
everything i've tried keeps giving me
sdb 100gb
for arbitrary number of disks, try:
$ echo '100gb@sdb,100gb@sdc,10kb@sdd' | awk -f'[@,]' '{for (i=2;i<=nf;i+=2) printf "%s ",$i; print ""}' sdb sdc sdd
answers original question
using awk
$ echo '100gb@sdb,100gb@sdc' | awk -f'[@,]' '{print $2,$4}' sdb sdc
using sed
$ echo '100gb@sdb,100gb@sdc' | sed 's/^[^@]*@//; s/,[^@]*@/ /' sdb sdc
using bash
$ s='100gb@sdb,100gb@sdc'; s=${s#*@}; echo ${s/,*@/ } sdb sdc