What have you tried using Perl?
Really, there is no way, one can help except giving "assumed" examples, since no code, examples, likes or modified script was not given.
However, if this might help.
Get all the user from the masterlist.txt, then iterate through the removelist.txt, to remove from the masterlist hash, names contained in the removelist that matches. Then print out all the remaining users in the masterlist hash.
UPDATE:
Please, if I may illustrate the point above, using an example that could help.
Note:
This might not be the perfect example, but am sure it will give up a head up.
masterlist.txt
barak osama bush jonathan perl python java c++
osama jonathan python java
#!/usr/bin/perl use warnings; use strict; my %new_list; read_n_work_file( 'masterlist.txt', sub { undef $new_list{ $_[0] } } ) +; read_n_work_file( 'removelist.txt', sub { delete $new_list{ $_[0] } if exists $new_list{ $_[0] } } ); print join "\n" => keys %new_list; # print to a new file sub read_n_work_file { my ( $file, $workout ) = @_; open my $fh, '<', $file or die "can't open file:$!"; while (<$fh>) { chomp; $workout->($_); } }
bush barak perl c++
In reply to Re: Removing users from a list
by 2teez
in thread Removing users from a list
by gossamer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |