Hi guys, I'm doing some website work at the moment and using CVS to develop the website code on my local server.
I'm about to start using CVS on the remote live (USA) server to log into the local server CVS repository and check out updates. It also means I can make small changes on the live server via ssh and check them back into CVS here preventing lost code changes, handling conflicts etc. I've done it before and it works great. Trouble is that this time the ADSL connection I'm using is not a static IP and tends to change now and then. :-) Easy to fix - I'll just have a small bash script I'll run on the live server just before I connect with cvs that uses 'who' to see what IP I'm logging in from i.e.: >sh-2.05$ who >foo pts/0 Jun 19 21:50 (222-152-182-159.jetstream.xtra.co.nz) So, I need to extract 222.152.182.159 using bash from the above string using bash scripting so I can update $CVSROOT. I'm a bit rusty on the bash string manipulation. Can anyone give me a solution off the top of their head? Thank you. :-)
