Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by phunni

  1. You shouldn't need to do much string manipulation - I think there may well be a method for pulling the about of the URL anyway... There is in java - although I can't remember what it is off the top of my head...


    Basically if www.mypage.com/ maps to a particular page then you can simply strip off the entire URL (minus query string) after than point.


    But - wouldn't it be easier to have it as a query parameter:




    You could then simply pull the "style" parameter off the incoming request parameters... To my mind it would be a much simpler approach...

  2. On the original sed command:


    sed -i -e "s/localhost:1433/" myuwe/apps/uPortal/properties/PersonDirs.xml


    I've made two very minor changes:


    perl-i -pe "s/localhost:1433/" myuwe/apps/uPortal/properties/PersonDirs.xml


    and it seems to be working a treat. I was trying to avoid perl because I was actually porting from a perl script and it did a whole bunch of complicated stuff... The fact, however, that I can use perl as a simple command - like sed (almost exactly like sed as it turns out...) means that it's still a bash script and I can understand and maintain it easily :thumbs:

  3. I'm trying to run the following line in a bash script:


    sed -n s/localhost:1433/ myuwe/apps/uPortal/properties/PersonDirs.xml


    My understanding is that ant instances of the string "localhost:1433" should be replaced by "", but this doesn't seem to be happening...


    What am I getting wrong...?

  4. OK, I'm trying to write a bash script - so I googled a couple of tutorials and got started. The first thing I wanted to do was to write a simpel function - all the tutorials seemed to suggest I could.


    So, to test the concept I wrote the following:


    echo "Thanks for coming..."
    function finish() {
     echo "done..."


    When I attempt to run this I get:


    Thanks for coming...
    ./myuwefit.sh: line 8: finish: command not found


    So, what am I missing here...?

  5. I'm an arch user also - and you do find a lot of helpful friendly people on the arch forums, but you also encounter a lot of elitism where people only want a few "experts" to discover their precious little distro.


    For me it's great because it's fast, lightweight and has the best (imho) package manager around - in fact it's the package manager that really makes it...

  6. Mosst of your questions I can't answer off the top of my head - but I will say that you should change your root password straight away - whether you think it's been compromised or not.


    Also - see if any services are running that you know nothing about and if any other ports have been opened...

  7. I'm currently messing around with developing a simpl game. At present all the startup data is based on an XML file, but it struck me that it would faster and easier to code if it was all in a database file.


    Now, the only databases I've ever worked with are enterprise server types - and some testing with access databases. What I need is a database that can be distributed as a file with the app - a la Access, but is platform independant since I want the game to be for Windows and Unix...


    Any suggestions? Is there such a thing?

  • Create New...