How can I extract the 6 characters after Z in the following text line and put it into a file using grep, egrep, sed or awk? B1_Site4_5aT4ZNHN691AQSB6B65_KYEC_SLT_2013-11-24-00-30_935985e7_100m_PASS1.tar
Extracting n characters from a test line
sed