I am running OpenVZ, on CentOS 5, i have developed 99% of the script and im looking for somebody who can VERY QUICKLY build me a small regex / Regular Expressions peice of code that will take data such as our command "vzlist" which displays a specified VPS.
The outcome would be:
VEID NPROC STATUS IP_ADDR HOSTNAME
110 55 running [login to view URL] [login to view URL]
120 54 running [login to view URL] [login to view URL]
We run "vzlist <veid>" so we only get 1 result i.e.
VEID NPROC STATUS IP_ADDR HOSTNAME
110 55 running [login to view URL] [login to view URL]
Then using the array[1] we can pull the line and using explode() we can run it working perfectly :) However when we try to run the same script on VEID: 120 it doesnt work, as there are more spaces between <IP> and <HOSTNAME> which makes the data that was $vps[6] for hostname $vps[8] for example! so our script cant be static,
We need this building VERY quickly and VERY cheaply! looking to get it done by the end of tonight/tommorow.
i have uploaded the file i have already that IS currently working. but only on VEID: 110 and ones that match the ammount of spaces in them.
Hello
I have seen your project requirements and Scope, im interested to working on this project
I look forward to hearing from you. Thank you for your consideration.
Thank you,
icsonweb