Подскажите программу для удаления пустых строк

Discussion in 'Болталка' started by ADeKBaT, 2 Feb 2013.

  1. ADeKBaT

    ADeKBaT Member

    Joined:
    21 Dec 2011
    Messages:
    1
    Likes Received:
    11
    Reputations:
    0
    и чтоб оставил только те строки в которых есть например знак "=", работа с тхт, у кого какие есть программы на примете
     
  2. mistika

    mistika New Member

    Joined:
    23 Jun 2012
    Messages:
    0
    Likes Received:
    2
    Reputations:
    0
    дай пример сделаю регулярку для нотепада
     
  3. ADeKBaT

    ADeKBaT Member

    Joined:
    21 Dec 2011
    Messages:
    1
    Likes Received:
    11
    Reputations:
    0
    Code:
    http://holyroarrecords.com/shop.php
    http://www.youxakep.ru/forum/cat-bezopasnost-i-uyazvimosti/topic-191.html
    http://us.dorothyperkins.com/webapp/wcs/stores/servlet/CatalogNavigationSearchResultCmd?catalogId=34072&storeId=13065&langId=-1&viewAllFlag=false&categoryId=327994&interstitial=true
    http://blogs.state.gov/index.php/site/entry/student_visa_advice
    http://lobocitofilm.de/
    http://www.rotaryvalve.com/index.php?option=com_content
    http://www.alottasigns.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=24&category_id=4&option=com_virtuemart&Itemid=58
    http://www.contiki.com/contikipedia/articles/visas-travelling-to-south-america
    http://www.reallyusefulproducts.co.uk/uk/html/onlineshop/terms.php
    http://de.etsy.com/shop/allisonstrine
    http://www.ub-careers.buffalo.edu/testing.php
    http://refills4all.com/order.php
    http://precisensan.com/antikforum/showthread.php?5711-skultuna-forsell
    http://www.southcentre.org/index.php?option=com_content&view=article&id=973:internship-opportunity-&catid=95:front-page-articles&lang=en
    http://www.themepartner.com/faq/
    http://menshelp.cc/viewtopic.php?f=12&t=108&start=1820
    http://www.ttischool.com/index.php?services
    http://www.worldpay.com/
    http://www.o2online.ie/o2/o2-money/content.php?cid=134
    http://www.visasavingsedge.com/members/article.php?sid=92XXdKrlo92&xid=128781
    http://twogeeksgraphics.com/
    http://www.holisticworld.co.uk/terms_and_conditions.php
    http://www.anachak.co.uk/visas.php
    http://www.tenkarausa.com/learn.php
    http://paridhanboutique.com/index.php?route=information/information&information_id=8
    http://www.aircare.ca/aboutus-qa.php
    http://boards.straightdope.com/sdmb/archive/index.php/t-4391.html
    http://www.ibichos.com/elarcadenoe/index.php?page_id=buy-motilium-in-manchester-uk-best-prices&category=motilium
    http://support.steampowered.com/kb_article.php?ref=8360-wejc-2625
    http://www.salsastore.com/index.php?id=21
    http://www.visasecuritysense.com/en_US/fraud-news.jsp
    http://www.ixwebhosting.com/
    http://www.saltyunderground.com/pages.php?pID=3
    http://lemonstand.com/
    http://indianaretina.com/index.php?option=com_content&view=article&id=4&Itemid=5
    http://www.zoombits.co.uk/product_info.php?products_id=19245&page=8
    http://www2.thaiembassy.fi/index.php/en/visaservices/transit-visa
    http://www.bootlegguitars.com/order/product_info.php?products_id=35
    http://www.paypal.com/webapps/mpp/make-online-payments
    http://www.newdirectionsaromatics.ca/policies.php
    http://www.herringshoes.co.uk/product-info.php?selectedColourid=1002&brandid=6&catid=63&shoeid=1916&selectedSizeid=0&selectedFitid=0
    http://www.fodors.com/community/cruises/visa-st-peters-russia.cfm
    http://shop.viewranger.com/page.php?page=termsandcond
    http://www.hamgadgets.com/index.php?main_page=index&cPath=21&products_id=64
    http://www.attachmatic.com/EN/politique-achat-en-ligne.php
    http://littlemachineshop.com/Info/payment.php
    http://www.cyanogen.com/maximdl_buy.php
    http://goldderoyale.com.au/content/content.php?pageid=11
    http://antifraudintl.org/showthread.php?20239-Verified-by-Visa
    http://46.105.120.71/immobilier/reunion/detail-annonce/appartement/le-tampon/location/66463.html
    http://www.ncl.com/nclweb/cruiser/cmsPages.html?pageId=VisaRequirements
    http://www.mygassigns.com/content/product.php?id=1921
    http://quinceandco.com/info.php
    http://www.worthparkdistrict.org/index.php?option=com_content&view=article&id=7&Itemid=16
    http://us.vonzipper.com/company.php?subsection=faq
    http://www.slovak-republic.org/visa-embassies/
    http://www.inch-blue.com/uk/customer-service.php
    http://store.velo-orange.com/index.php/customer-service
    http://www.proyectopreven.org/aulafaspa/index.php?cal_m=12&cal_y=1948
    http://www.visapo.com/UK-united-kingdom-british-fiance-fiancee-visas-for-filipinos-filipinas-philippine.php
    http://www.kuhar.com/main.php?kuhar=resources
    http://www.eco-dent.com/between.php
    http://www.path2usa.com/visitor-visa-faq
    http://netibox.fr/terms.php
    http://www.proudproducers.com/faq.php
    http://www.kinokuniya.com/my/index.php/fgu001
    http://www.travelodge.co.uk/help/index.php?category=6
    http://www.black-blum.fr/onlinestore/terms-and-conditions/
    http://www.sunwarrior.com.au/sun-warrior-terms-conditions.php
    http://www.alottasigns.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=24&category_id=4&option=com_virtuemart&Itemid=58
    http://www.elecsolbatteries.com/terms-fr.php
    http://www.rabbitmart.com/contact.php
    http://stockcenter.ucsd.edu/info/shopping.php
    http://www.italiadesigns.co.uk/conditions.php?language=fr&osCsid=0ded8c129b488f934d145bbf8596db3a
    
    
    http://www.buymobilephones.net/info_terms.php?id=12
    http://www.mainesportsman.com/store/index.php?main_page=product_info&products_id=186
    http://www.perigord-produits.com/foie-gras/terms-and-conditions.php
    http://colasoft.com/support/faq/purchase.php
    http://blog.instabill.com/index.php/2012/06/20/visa-high-brand-risk-merchant-categories
    http://www.vanityfairprints.com/product_info.php?cPath=9&products_id=183
    http://www.delcampe.de/popup_print_item.php?language=G&id=2044231
    http://www.dealdash.com/page.php?id=2
    http://www.newshoppingzone.com/faq.php
    http://www.hogueprophecy.com/mabus/
    http://www.splendia.com/de/dar-ayniwen-marrakesch.html
    http://www.sitejabber.com/forum/advice-on-websites/how-to-get-your-money-back
    http://www.safecart.com/help-center/
    http://tronderfotball.no/index.php?do=product&id=731
    http://www.crimescene.com/store/index.php?main_page=product_info&products_id=49
    http://waska.com/en/produits.php?cat=Laths+%26+Stickers&i=3
    http://www.grasshopperproducts.com/shipping.php
    http://www.canadavisa.com/canada-immigration-discussion-board/temp-health-insurance-cover-why-should-u-have-one-t39920.60.html
    http://www.12345clothing.com/shop/cms.php?id_cms=5
    http://www.camomyride.com/index.php?ID=1128
    http://www.modbusdriver.com/shop/product_info.php?products_id=66
    http://www.tigerairways.com/sg/en/verified_by_visa.php
    http://support.steampowered.com/kb_article.php?ref=8360-wejc-2625
    http://www.presseurop.eu/fr/content/news-brief/2520841-les-exportations-record-sont-elles-un-probleme
    http://www.travelfish.org/blogs/malaysia/2012/05/18/getting-a-thai-visa-in-kuala-lumpur/
    http://cube4you.com/index.php?main_page=shippinginfo
    http://www.rubbertirechains.com/index.php?main_page=faq
    
    http://www.luxcaddy.lu/iinfo.php?page=inf_faq&PHPSESSID=afdae12a511741efd1d92dc4d7d79325&lang=en&PHPSESSID=afdae12a511741efd1d92dc4d7d79325
    http://us.dorothyperkins.com/webapp/wcs/stores/servlet/CatalogNavigationSearchResultCmd?catalogId=34072&storeId=13065&langId=-1&viewAllFlag=false&categoryId=327994&interstitial=true
    http://uk.ebid.net/help_money.php
    http://www.boydmemoryfoammattresses.com/faq.php
    http://www.lightinthebox.com/de/final-fantasy-vii-wolke-streit-holz-cosplay-schwert_p216975.html
    http://www.visasavingsedge.com/members/article.php?sid=92XXdKrlo92&xid=128781
    http://www.navyfederal.org/products-services/cards/creditcards/creditcards.php
    http://www.franzose.de/shop_downloads.php?did=105
    http://forums.bestbuy.com/t5/Best-Buy-Geek-Squad-Policies/Does-Best-Buy-stores-accept-Visa-prepaid-debit-cards/td-p/45378
    http://www.virgin-atlantic.com/gb/en/travel-information/getting-into-the-country/us-visa.html
    http://www.comeinside.com.au/site/index.php?o=37
    http://www.beasbydreshops2013.fr/index.php?main_page=faq
    http://www.expresstorussia.com/apply_for_russian_visa.html
    http://shopping.ccbill.com/online-merchants/merchant-signup.php
    http://eacoviroe.org/ISIH/ISIH_condo.pdf
    http://www.techkranti.com/2010/03/sql-injection-step-by-step-tutorial.html
    http://www.worldmusicaustria.info/?tag=visa
    http://www.samuelfrench.com/faq
    
    
    http://forums.moneysavingexpert.com/showthread.php?p=59045043
    http://www.techkranti.com/2010/03/sql-injection-step-by-step-tutorial.html
    http://www.corlettelondon.com/products.php?sale=page
    http://www.play-asia.com/paOS-00-3-helppayment-49-en.html
    http://www.theswisspharmacy.com/product_info.php?info=p9763_Kamagra-Jelly-Mint-Flavor.html
    http://www.lescriques.com/download/download.php?fichier=Tarifs.CDP.2013-WEB.pdf&nom_fichier=Tarifs.CDP.2013-WEB.pdf&id=23
    http://www.tidepooltoys.com/index.php?option=com_content&task=view&id=31&Itemid=81
    http://lemonstand.com/docs/order_details_page/
    http://www.wildaboutflowers.ca/product_info.php
    http://www.casawladival.com/eng/yagbook/index.php?page=8169
    http://www.12345clothing.com/shop/cms.php?id_cms=5
    http://www.manuelferrol.com/index.php?page_id=penis-extender-deluxe-girth-1-pregnant&category=penis-extender-deluxe-girth
    http://shop.vegansociety.com/
    http://www.boohoo.com/restofworld/pcat/faq/
    http://www.secret-ceres.com/xml.php
    http://www.elephants.com/estore/views.php?cat=6%5E57&lab=1&sub_link=&desc=Wish%20List%20-%20elephant%20health%20items&menu_oid=6&sessionId=kdeth4ihr3jfaafoc7690avj92
    http://www.bellengineering.net/information.php?info_id=2
    http://www.stylefly.at/index.php?Itemid=10&option=com_phocaguestbook&view=phocaguestbook&id=1
    
    
    
    http://southernstructural.ipower.com/warehouseSales.php
    http://www.missionalwear.com/faq.php
    http://www.easyrider.lu/index.php?option=com_content&view=article&id=261&Itemid=55
    http://www.privacyrights.org/fs/fs15-mt.htm
    http://www.concert-brise.eu/presse.php
    http://www.imparja.com/store/extra_info_pages.php?pages_id=5&osCsid=b92d0ee29decafbc4340b43469aabaa0
    http://www.backyardstyle.com/contact.php
    http://www.daydeal.com/help.php?section=FAQ
    http://www.natureetharmonie.fr/index-en.php?act=page&code_page=cgv
    http://pocoapoco.com/index.php?option=com_content&view=category&layout=blog&id=2&Itemid=3
    http://www1.prometheanplanet.com/es/server.php?show=nav.23930
    
    http://www.makemytrip.com/legal/visaregulations-Malaysia.php
    http://thetvdb.com/index.php?tab=series&id=168571&lid=17
    http://www.easyfiancevisa.com/k1-fiance-visa-testimonials.php
    http://www.newburycomics.com/rel/v2_home.php?deptnr=114&storenr=103
    http://www.flyingpassport.com/travel.php?id=Mg==
    http://www.bigrock.com/payment-options/
    как удалить пустые строки уже нашёл, а как оставить только строки где есть символ =?
     
    #3 ADeKBaT, 2 Feb 2013
    Last edited: 2 Feb 2013
  4. Eich3

    Eich3 Member

    Joined:
    27 Jan 2013
    Messages:
    22
    Likes Received:
    7
    Reputations:
    5
    Code:
    from sys import stdin
     
    rows = [row.strip() for row in stdin.readlines()]
    cleared = [row for row in rows if len(row) > 0 and row.find('=')]
    print '\n'.join(cleared)
    
    Запускать так:

    cat urls.txt | python /path/to/script >output.txt
     
    #4 Eich3, 2 Feb 2013
    Last edited: 2 Feb 2013
  5. mironich

    mironich Elder - Старейшина

    Joined:
    27 Feb 2011
    Messages:
    733
    Likes Received:
    73
    Reputations:
    19
    Питон поставь.
    И вставь этот код.
    Code:
    open('res.txt', 0, 'w').writelines([s for s in open('Файл с ссылками').readlines()\
    if len(s) > 1 and '=' in s])
     
  6. mistika

    mistika New Member

    Joined:
    23 Jun 2012
    Messages:
    0
    Likes Received:
    2
    Reputations:
    0
    можно квк :D выборка в ключи поставь =
     
  7. ADeKBaT

    ADeKBaT Member

    Joined:
    21 Dec 2011
    Messages:
    1
    Likes Received:
    11
    Reputations:
    0
    а есть софт? на эту тему?
     
  8. mistika

    mistika New Member

    Joined:
    23 Jun 2012
    Messages:
    0
    Likes Received:
    2
    Reputations:
    0
    http://newox.ru/kwk.php выборку сделай ключ "="
     
  9. ADeKBaT

    ADeKBaT Member

    Joined:
    21 Dec 2011
    Messages:
    1
    Likes Received:
    11
    Reputations:
    0
    благодарю
     
Loading...