Link to home
Start Free TrialLog in
Avatar of rares_dumitrescu
rares_dumitrescu

asked on

bash sort

hello
i have a text file with web adresses
the text file is like this:
www.computergames.ro
www.linkweb.ro
www.shopmania.ro
www.gardianul.ro
www.onlinesport.ro
www.desprecopii.com
www.blogsport.ro

how can i take each web adress, remove the www. and make another file with the domains only ?
thanx
ASKER CERTIFIED SOLUTION
Avatar of Morcalavin
Morcalavin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rares_dumitrescu
rares_dumitrescu

ASKER

and another thing ..
the newfile.txt is now:

neogen.ro
gsp.4you.ro
prosport.com
libertatea.ro
sport.beta.testing.info
evz.com
ejobs.ro
kappa.org
hopa.creta.ro
clubafaceri.ro
acasa.ro
hotnews.react.in

i would like to take each one, and put into newfile2.txt only the ones that are NAME.ro NAME.com NAME.org or NAME.net the rest (.info etc, or subdomains not)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
and the last thing
i would like to take all the domains (after the filtering) and do a whois on them, and the whois put into a file
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanx! great help!!