=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have a string like this:
nathan/has/no/brains
My problem is, I need to but that string up so only "brains" is available.
Problem is, the string is different everytime. Sometimes it may be 2 words=
=20
seperated by / or it may be 15 words seperated by /
The only similarity between every string, is I only want the LAST word from=
=20
each string.
How do I do that?
nathan/is/brain/dead I want dead
my/computer/is/not/helping I want helping
this/sucks I want sucks
get it?
How can I accomplish this with bash? I know there is a way to count how
many fields there are using / as a delimiter, but I can't remember how
to do it!!!
help?
=2D --=20
Nathan England
Arcanum Linux !
nathan at the-arcanum.org
jabber id:
linuxjunkie@jabber.earth.li
"A free society is one where it is safe to be unpopular."
=2D --Adlai Stevenson
Registered Linux User #189789, Machine #106603
www.sincerechoice.org
Spam related material will be forwarded to:
uce@ftc.gov
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/WQ8LnIZkEnRTrK0RAqEAAJ9pMppRNwNI2IxN4gfCdtpSQ8LzDwCffttD
WMwoD/HMuIoMLNBn/PBjWZc=3D
=3DAbE3
=2D----END PGP SIGNATURE-----