fast unix question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zester
    Confirmed User
    • Jul 2003
    • 5344

    #1

    fast unix question

    I have this string:

    Code:
    a = "/home/blackgeer/1022/index.html"
    how do I chop off the "index.html" part and only keep the "/home/blackgeer/1022/" part ?
    * Mainstream ? $65 per sale
    * new male contraception
  • UltraSonic
    Confirmed User
    • Jul 2004
    • 1728

    #2
    Originally posted by Zester
    I have this string:

    Code:
    a = "/home/blackgeer/1022/index.html"
    how do I chop off the "index.html" part and only keep the "/home/blackgeer/1022/" part ?
    Are you serious?
    Your Blend, Your Product

    Comment

    • tgpmakers
      Confirmed User
      • Feb 2004
      • 575

      #3
      if(a=m~{(.*?)index\.html})
      print $1;
      Providing you using Perl.
      http://www.tgpmakers.com/

      Comment

      • Zester
        Confirmed User
        • Jul 2003
        • 5344

        #4
        Originally posted by garymayor
        if(a=m~{(.*?)index\.html})
        print $1;
        Providing you using Perl.
        no i don't.
        this is done in an .SH file

        I know how to do this in perl, i'm no sysadmin by the way
        Last edited by Zester; 08-10-2005, 07:31 AM.
        * Mainstream ? $65 per sale
        * new male contraception

        Comment

        • grumpy
          Too lazy to set a custom title
          • Jan 2002
          • 9870

          #5
          try an editor
          Don't let greediness blur your vision | You gotta let some shit slide
          icq - 441-456-888

          Comment

          • jerzeemedia
            Confirmed User
            • May 2004
            • 1532

            #6
            a = "/home/blackgeer/1022/index.html"

            echo $a|sed 's/index\.html//'
            Free Adult Blog Hosting
            http://www.waqn.com

            free porn
            www.mojohost.com - Best guys, best host.

            Comment

            • Radiate
              Confirmed User
              • Dec 2004
              • 1454

              #7
              format c:

              icq 199437756 - contact me if you need a solid hosting solution

              Comment

              Working...