reiko Posted July 5, 2011 Report Share Posted July 5, 2011 daca stie cineva si poate sa imi zica si mie cum sortez intr0un fisier cuvintele cu o anumita terminatie.exmplu:in fisieru x care contine : masa casa ceasca cafea sucsa le sorteze pe alea care se termina in "*sa".multumesc anticipat. Quote Link to comment Share on other sites More sharing options...
alexarpad2003 Posted July 5, 2011 Report Share Posted July 5, 2011 Cut and paste ! Quote Link to comment Share on other sites More sharing options...
reiko Posted July 5, 2011 Author Report Share Posted July 5, 2011 si cand ai 100 mb de text ? cati ani iti trebui sa dai cut + paste ? Quote Link to comment Share on other sites More sharing options...
alexarpad2003 Posted July 5, 2011 Report Share Posted July 5, 2011 Glumeam. Si hai nu exagera ca nu lucrezi cu fisiere de 100 de mb tip txt ! Am sa ma gandesc cand ma trezesc la un script care sa iti faca asta. Quote Link to comment Share on other sites More sharing options...
Xander Posted July 5, 2011 Report Share Posted July 5, 2011 e cam ciudat ce ceri:) ... nu explici calumea:sortezi pastrand indexii initiali ai cuvintelor adica:masaceascacasacafeasuc=>casaceascamasacafeasucsau le inserezi la inceput / sfarsit? Quote Link to comment Share on other sites More sharing options...
Stealth2 Posted July 5, 2011 Report Share Posted July 5, 2011 Daca stau si ma gandesc cateva secunde, cred ca vrea un extractor / sort de email-uri.Ele se termina in @yahoo.com / @gmail.com / @hotmail.com etc.Vezi ca sunt diferite script-uri, tool-uri pt astea. Cauta. Quote Link to comment Share on other sites More sharing options...
reiko Posted July 5, 2011 Author Report Share Posted July 5, 2011 sa imi pastreze doar cuvintele care se termina in "*sa". daca era vorba de email imediat gaseam un tool. Quote Link to comment Share on other sites More sharing options...
Xander Posted July 5, 2011 Report Share Posted July 5, 2011 cat fisier | grep "sa^"daca nu ai linux ... ghinion Quote Link to comment Share on other sites More sharing options...
reiko Posted July 5, 2011 Author Report Share Posted July 5, 2011 nu face nimik comanda asta Quote Link to comment Share on other sites More sharing options...
alexarpad2003 Posted July 5, 2011 Report Share Posted July 5, 2011 Ai linux ? Quote Link to comment Share on other sites More sharing options...
Zatarra Posted July 5, 2011 Report Share Posted July 5, 2011 cat fisier | grep "sa^"daca nu ai linux ... ghinion E gresit..Uite aici ceva folositor in Linux:Ai asa:terasacasaceascacafeasucmasarufedornuesmodosaSi dai asa..cat a.txt |grep sa$ |sort |uniqVei obtine:casamasamodosaterasaCe face? Pei.. grep le selecteaza pe cele cu terminatia sa, sort le sorteaza in ordine alfabetica, iar uniq le sterge pe alea care se repeta.Bafta Quote Link to comment Share on other sites More sharing options...
reiko Posted July 5, 2011 Author Report Share Posted July 5, 2011 gata. mersi mult. cat xxx.txt | grep sa >>new.txt Quote Link to comment Share on other sites More sharing options...
Zatarra Posted July 5, 2011 Report Share Posted July 5, 2011 gata. mersi mult. cat xxx.txt | grep sa >>new.txtComanda nu e buna, iti va afisa orice linie unde gaseste 'sa'. Daca vrei sa afiseze doar cele care se termina in sa adauga $ care marcheaza sfarsit de linie. Quote Link to comment Share on other sites More sharing options...
reiko Posted July 5, 2011 Author Report Share Posted July 5, 2011 am observat. am dat apoi cu comanda de la tine mersi inca o data Quote Link to comment Share on other sites More sharing options...
Xander Posted July 5, 2011 Report Share Posted July 5, 2011 cam greu la ora asta $ vroiam sa pun nu ^ Quote Link to comment Share on other sites More sharing options...