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 Mark Forums Read
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 12-09-2003, 10:32 PM   #1
TheJimmy
ICQ- five seven 0 2 5 5 0
 
Join Date: Jan 2001
Posts: 10,747
Question for Unix Gurus

I'm sure there is a way to do this with a *nix command but I'm at a complete loss...


I have a group of data...like the following


domain.com/subdir/yadayada.php?sqiggly,;lkjsdf;lkajsdf
domain.com/subdir/stuff.php
domain.com/lalbasdf.php12341234

etc


is there a way to chop off the trailing items just leaving

the

domain.com/subdirs

and

domain.com



?



thanks in advance...
__________________
Investor with 5m - 15m USD to invest. Do you have a site or network of sites earning 50k - 200k a month income? Email your contact and preliminary data to: domain.cashventures (at) gmail.com....Please...no tire kickers...serious offers and inquiries only.
TheJimmy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-09-2003, 10:34 PM   #2
Eve
Confirmed User
 
Industry Role:
Join Date: Dec 2002
Location: Phoenix, Arizona
Posts: 805
http://www.cs.uu.nl/docs/vakken/st/nawk/nawk_toc.html
Eve is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-09-2003, 10:58 PM   #3
vending_machine
Confirmed User
 
Join Date: Jun 2002
Location: Seattle
Posts: 1,062
Is this what you're trying to do (done in bash)?

Code:
# cat list
domain.com/subdir/yadayada.php?sqiggly,;lkjsdf;lkajsdf
# cat list | while read line ; do dirname $line ; done
domain.com/subdir
vending_machine 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
Thread Tools



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.