GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Question for Unix Gurus (https://gfy.com/showthread.php?t=206710)

TheJimmy 12-09-2003 10:32 PM

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...

Eve 12-09-2003 10:34 PM

http://www.cs.uu.nl/docs/vakken/st/nawk/nawk_toc.html

vending_machine 12-09-2003 10:58 PM

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



All times are GMT -7. The time now is 07:31 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123