Re: remove duplicate lines



Can't you run uniq from the command prompt to get rid of the duplicate lines?

perlnewbie..


On Friday 27 May 2005 09:07 am, John Doe wrote:
> Hello
>
> As an addition to my last post:
>
> Am Freitag, 27. Mai 2005 13.56 schrieb Jack Daniels (Butch):
> > Wow, I'm really confused. I'm trying to remove duplicate lines from a
> > marc21 text file. I have spent countless hours searching for scripts
> > etc.
> >
> > What I find frustrating while trying to learn Perl, is that most
> > solutions assume you know what to do.
>
> I think this is nothing special; if somebody has coded a _solution_, he
> (hopefully) knows what he has done.
>
> To learn perl, you have to spend hours and hours studying
> books/docs/examples, thinking, trying etc.
>
> > For example, someone gives the code to find and replace, and that's it.
>
> Generally, as preciser a question is formulated, as bigger the chance that
> the answer is precise too. If you have the luck to get an answer from a
> guru (I'm not a guru), he will point you to good resources for learning.
>
> > In other words, if the complete script was there, I think I could learn
> > much
>
> faster.
>
> On the other side, it can hinder from learning, since one can simply _run_
> the script without even trying to understand it.
>
> > I have no idea of how to put the code into a script.
>
> If you have searched for scripts, and found at least one, you already have
> an example how to put code into a script.
>
> [...]
>
> [snip example data]
>
> kind regards, joe

.



Relevant Pages

  • Re: Seperating CSV rows into new, seperate files
    ... of a script but it still has one more problem. ... will import the list will ignore duplicate rows. ... >> and I am working on a way to parse a CSV file of class lists from MS ... The difference is that the session number changes. ...
    (comp.lang.python)
  • Add User to group through comparison to other users memberships
    ... I have a "New User" script which is very complex and handles adding most ... AD properties upon creation, address tab, phones, profile tab, ... strUsr2Duplicate = inputbox("What is the username you wish to duplicate ... msgbox "No user requested - No group memberships will be duplicated" ...
    (microsoft.public.windows.server.active_directory)
  • Re: Compare tables for duplicates
    ... There are regular fields that have a different value in each record, and global fields which have the same value in all the records of that file. ... If I create a regular field that I name 'Constant' of type 'Texte' and that I make 'Calculated', then I may say that that calculation will be 1 and type 'Number'. ... Say in A, I want to tell B of the value of the NameID of the current record of A. I then make a script line in A saying 'Set Field' where 'gn1' is a global field numeric, then a second script line passes the hand to B by 'Perform Script. ... I created a field in Table A called Duplicate. ...
    (comp.databases.filemaker)
  • Re: Compare tables for duplicates
    ... There are regular fields that have a different value in each record, and global fields which have the same value in all the records of that file. ... If I create a regular field that I name 'Constant' of type 'Texte' and that I make 'Calculated', then I may say that that calculation will be 1 and type 'Number'. ... Say in A, I want to tell B of the value of the NameID of the current record of A. I then make a script line in A saying 'Set Field' where 'gn1' is a global field numeric, then a second script line passes the hand to B by 'Perform Script. ... I created a field in Table A called Duplicate. ...
    (comp.databases.filemaker)
  • Re: Please can some help me with this script
    ... Other than that the script ran fine. ... I assume you use a dictionary object to avoid duplicate names, ... objDictionary.Add strNextLine, i ...
    (microsoft.public.windows.server.scripting)