Posted By

wearetherock on 11/25/09


Tagged

String


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

scilec
bubnoff


Bash String


 / Published in: Bash
 

URL: http://www.youtube.com/watch?v=LtbscO19Q1k&feature=player_embedded

  1. [trixbox1.localdomain ~]# a=aa-2009-01-01
  2. [trixbox1.localdomain ~]# echo $a
  3. aa-2009-01-01
  4. [trixbox1.localdomain ~]# echo ${a#*-2009}
  5. -01-01
  6. [trixbox1.localdomain ~]# echo ${a%-2009*}
  7. aa

Report this snippet  

You need to login to post a comment.