Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-10-2005, 08:25 AM   #1
Zester
Confirmed User
 
Zester's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 5,344
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
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-10-2005, 08:26 AM   #2
UltraSonic
Confirmed User
 
Join Date: Jul 2004
Location: UltraVirtuality
Posts: 1,728
Quote:
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

UltraSonic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-10-2005, 08:28 AM   #3
tgpmakers
Confirmed User
 
Join Date: Feb 2004
Location: United Kingdom
Posts: 575
if(a=m~{(.*?)index\.html})
print $1;
Providing you using Perl.
__________________
http://www.tgpmakers.com/
tgpmakers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-10-2005, 08:29 AM   #4
Zester
Confirmed User
 
Zester's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 5,344
Quote:
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
__________________
* Mainstream ? $65 per sale
* new male contraception

Last edited by Zester; 08-10-2005 at 08:31 AM..
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-10-2005, 08:39 AM   #5
grumpy
Too lazy to set a custom title
 
grumpy's Avatar
 
Join Date: Jan 2002
Location: Holland
Posts: 9,870
try an editor
__________________
Don't let greediness blur your vision | You gotta let some shit slide
icq - 441-456-888
grumpy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-10-2005, 08:40 AM   #6
jerzeemedia
Confirmed User
 
Industry Role:
Join Date: May 2004
Location: New Jersey
Posts: 1,532
a = "/home/blackgeer/1022/index.html"

echo $a|sed 's/index\.html//'
jerzeemedia is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-10-2005, 09:56 AM   #7
Radiate
Confirmed User
 
Join Date: Dec 2004
Location: the center
Posts: 1,454
format c:
__________________

icq 199437756 - contact me if you need a solid hosting solution
Radiate is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.