If you know want the text "_jal", you can use line below.  I saved  
your text string in a file called testsed.

$ sed -e "s/.*\(_jal\)/\1/" testsed

If you want the "_jal" because it is the last group of letters, then  
you could use the following line.

$ sed -e "s/.*\(_.*\)/\1/" testsed

both commands return the following output:

_jal


Joshua Draper




On Mar 9, 2007, at 2:02 PM, 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

Reply via email to