help : awk command

Hello all,
I am new one to this forum.
(bash scripting.)

I have a file.

http://sg.yimg.com/i/my/mastheads/my\_ans_ma1.gif
internal://project/squid-internal-static/icons/anthony-unknown.gif

cacheobjects://project/css/bdg.js
ftp://erd.org/bgr/mine.gif
...........................................
.........................................

i try tp print only full domain names with http, ftp etc..

http://sg.yimg.com
internal://project

cacheobjects://project
ftp://erd.org
..................
..................

i try one command
awk 'BEGIN{OFS=FS="/"} {print $1 $2}' filename

But this provide only

http:
ftp:
internal:
..........
.......
........

Pls help me

You have mentioned field separator as '/'

For Yahoo!,

$1 --> http:
$2 --> null between the two consecutive slashes
$3 --> sg.yimg.com

awk 'BEGIN{FS="/"} {print $1"//"$3}' filename

try this:

awk -F'/' '{print $1 "//" $3}' filename

oh well, didn't realize that krish has already replied. thanks.

Thanks to U.
i am student. i am doing project in squid.

i don't know the script.

this command works successfully.

need ur help in future also.