select a particular field

hi
i have a file

wwww-qqq.eee [123343333] ksdklfsdf adm,as.d,am sdsdlasdjl sadsadasda
wwww-qqq.eee [123343331] ksdklfsdf adm,as.d,am sdsdlasdjl sadsadasda
wwww-qqq.eee [123343332] ksdklfsdf adm,as.d,am sdsdlasdjl sadsadasda
wwww-qqq.eee [123343333] ksdklfsdf adm,as.d,am sdsdlasdjl sadsadasda
wwww-qqq.eee [123343334] ksdklfsdf adm,as.d,am sdsdlasdjl sadsadasda

from the above file i need to extract secon field [123343333] and print that line to a separate file

please help

thanks
Satya

cut -f2 file >newfile

awk '{print $2,NR}' "$file_name" | cut -d'[' -f2 | tr -d ']' > "$backfile"

Yeah, you could cut on [ if you want to remove the brackets. The awk is rather unnecessary, though.

cut -d'[' -f2 file | cut -d']' -f1 >newfile

Or just with awk:

awk 'BEGIN{FS="\[|\]"}{print $2}' file

Regards