Sponsored Content
Top Forums Shell Programming and Scripting Shell Script to Create non-duplicate lists from two lists Post 302410365 by mlv_99 on Monday 5th of April 2010 06:27:27 PM
Old 04-05-2010
Shell Script to Create non-duplicate lists from two lists

File_A contains Strings:
a
b
c
d

File_B contains Strings:
a
c
z



Need to have script written in either sh or ksh. Derive resultant files (File_New_A and File_New_B) from lists File_A and File_B where string elements in File_New_A and File_New_B are listed below.

Resultant files:
File_New_A contains String:
a
c


File_New_B contains String:
z


Thank you in advance for your help.
mlv_99
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check lists for Unix Shell Programming

Hi all, Can anyone provide me any checklists or a list of steps I should follow before executing my scripts. Could also tell me if there are any other standards to be followed while shell programming like naming conventions for variables etc. Your help would be much appreciated. Regards,... (2 Replies)
Discussion started by: srikanth_ksv
2 Replies

2. Shell Programming and Scripting

Help with a shell script to concatenate lists together

Below is a description of what im trying to achieve: Write a shell script to concatenate lists together, and output the resulting list. Do not include any argument that is a sub-list of the entire list. (The script will clean the list of any redundant items.) You must preserve the original order... (1 Reply)
Discussion started by: rfourn
1 Replies

3. Shell Programming and Scripting

Editing lists of integers in 1d files with bash shell

Hi, I need a script that will: 1. Go through about 20 different folders, each containing about 20 1d files. The 1d files go something like this: 22.253 37.707 78.117 112.374 127.944 156.067 180.956 233.785 249.256 ... (1 Reply)
Discussion started by: ac130pilot
1 Replies

4. Shell Programming and Scripting

C shell: Working with lists

Hello Unix Gurus, I have: A list of parameters that repeat (in .txt file) Example: params.txt Series: XYZ Manufacturer: ... Software Version: ... Year made: ... Series Series: XYZ Manufacturer: ... Software Version: ... Year made: ... Series Series: ABC Manufacturer: ... ... (7 Replies)
Discussion started by: lapiduslost
7 Replies

5. Shell Programming and Scripting

Bash script to compare two lists

Hi, I do little bash scripting so sorry for my ignorance. How do I compare if the two variable not match and if they do not match run a command. I was thinking a for loop but then I need another for loop for the 2nd list and I do not think that would work as in the real world there could... (2 Replies)
Discussion started by: GermanJulian
2 Replies

6. Shell Programming and Scripting

Shell script that lists files with different owner than the folder

Hello, I'm trying to write a script which is listing files based on different preferences, like filetype or permissions. All is fine, except for one: I want to list files in /home which has a different owner than the home directory it is in. Here is an example: /home/UserA is the directory, and... (10 Replies)
Discussion started by: Zwiebi
10 Replies

7. Shell Programming and Scripting

get the lists

I expert, I may cross post something similar but I dirtyed my quesion somehow to be clear in the thread #cat file1 88dee gcc: Grok for callconvention-hard to enable hard float a2ad2 eglibc: package mtrace separately 61487 python: bump PR of packages after update of distutils.bbclass... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

8. Shell Programming and Scripting

Removing duplicate entries from edge-lists

I have a file which has connections given as: A B 0.1 B C 5.8 C B 5.8 E F 0.67 B A 0.1 A B and B A are same, so I want to remove one of them. Same with BC and CB. Desired output: A B 0.1 B C 5.8 E F 0.67 (2 Replies)
Discussion started by: Sanchari
2 Replies

9. Shell Programming and Scripting

• Write a shell script that upon invocation shows the time and date and lists all the logged-in user

help me (1 Reply)
Discussion started by: sonu pandey
1 Replies

10. UNIX for Beginners Questions & Answers

How to get script to create a new file that lists folder content sorted by size?

I have a script that sorts and processes unsorted files to newly created directories. Its working great, but I am trying to understand the leanest method to get the script to create an additional file within each newly created directory that: Contains a list of all files in the directory... (4 Replies)
Discussion started by: Braveheart
4 Replies
String::ToIdentifier::EN(3pm)				User Contributed Perl Documentation			     String::ToIdentifier::EN(3pm)

NAME
String::ToIdentifier::EN - Convert Strings to English Program Identifiers SYNOPSIS
use utf8; use String::ToIdentifier::EN 'to_identifier'; to_identifier 'foo-bar'; # fooDashBar to_identifier 'foo-bar', '_'; # foo_dash_bar to_identifier 'foo.bar', '_'; # foo_dot_bar to_identifier "foox{4EB0}bar"; # fooJingBar to_identifier "foox00bar"; # fooNullCharBar to_identifier "foox00x00bar"; # foo2NullCharsBar to_identifier "foox00x00bar", '_'; # foo_2_null_chars_bar { no utf8; to_identifier "fooxFFxFFbar.baz"; # foo_2_0xFF_BarDotBaz to_identifier "fooxFFxFFbar.baz", '_'; # foo_2_0xFF_bar_dot_baz } DESCRIPTION
This module provides a utility method, "to_identifier" for converting an arbitrary string into a readable representation using the ASCII subset of "w" for use as an identifier in a computer program. The intent is to make unique identifier names from which the content of the original string can be easily inferred by a human just by reading the identifier. If you need the full set of "w" including Unicode, see the subclass String::ToIdentifier::EN::Unicode. Currently, this process is one way only, and will likely remain this way. The default is to create camelCase identifiers, or you may pass in a separator char of your choice such as "_". Binary char groups will be separated by "_" even in camelCase identifiers to make them easier to read, e.g.: "foo_2_0xFF_Bar". EXPORT
Optionally exports the "to_identifier" function. SUBROUTINES
to_identifier Takes the string to be converted to an identifier, and optionally a separator char such as "_". If a separator char is not provided, a camelCase identifier will be returned. METHODS
string_to_identifier The class method version of "to_identifier", if you want to use the object oriented interface. SEE ALSO
String::ToIdentifier::EN::Unicode, Text::Unidecode, Lingua::EN::Inflect::Phrase AUTHOR
Rafael Kitover, "<rkitover@cpan.org>" BUGS
Please report any bugs or feature requests to "bug-string-toidentifier-en at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=String-ToIdentifier-EN <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=String-ToIdentifier- EN>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. REPOSITORY
http://github.com/rkitover/string-toidentifier-en <http://github.com/rkitover/string-toidentifier-en> SUPPORT
More information on this module is availableat: o RT: CPAN's request tracker (report bugs here) http://rt.cpan.org/NoAuth/Bugs.html?Dist=String-ToIdentifier-EN <http://rt.cpan.org/NoAuth/Bugs.html?Dist=String-ToIdentifier-EN> o AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/String-ToIdentifier-EN <http://annocpan.org/dist/String-ToIdentifier-EN> o CPAN Ratings http://cpanratings.perl.org/d/String-ToIdentifier-EN <http://cpanratings.perl.org/d/String-ToIdentifier-EN> o MetaCPAN <https://metacpan.org/module/String::ToIdentifier::EN> o Search CPAN http://search.cpan.org/dist/String-ToIdentifier-EN/ <http://search.cpan.org/dist/String-ToIdentifier-EN/> LICENSE AND COPYRIGHT
Copyright (c) 2011 Rafael Kitover <rkitover@cpan.org>. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information. perl v5.14.2 2012-02-27 String::ToIdentifier::EN(3pm)
All times are GMT -4. The time now is 08:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy