I found the reply to my own question: echo "akd_fak_asdkf_jal" | sed -e "s/\(_.*\)//" ===> akd
Eduardo Sanz Garcia wrote: >Now the *oposite* question: >If I have a line like this "akd_fak_asdkf_jal" and I want the leading "akd" >How can I do this using sed or other utilities? > > >Eduardo Sanz García wrote: > > > >>A sed question: >>I have a line like this "akd_fak_asdkf_jal" and I want the trailing >>"_jal". >>How can I do this using sed or other utilities? >> >>Thank you. >>-------------------- >>BYU Unix Users Group >>http://uug.byu.edu/ >> >>The opinions expressed in this message are the responsibility of their >>author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. >>___________________________________________________________________ >>List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list >> >> >> >> >> >-------------------- >BYU Unix Users Group >http://uug.byu.edu/ > >The opinions expressed in this message are the responsibility of their >author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. >___________________________________________________________________ >List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list > > > -------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
