Sponsored Content
Top Forums Shell Programming and Scripting Compare semicolon seperated data in 2 files using shell script Post 302372019 by thegeek on Tuesday 17th of November 2009 12:03:53 AM
Old 11-17-2009
Code:
sort -k1 temp1.txt -t';' > tmpfile1 && sort -k1 temp2.txt -t';' | comm -3 - tmpfile1

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

converting a tabular format data to comma seperated data in KSH

Hi, Could anyone help me in changing a tabular format output to comma seperated file pls in K-sh. Its very urgent. E.g : username empid ------------------------ sri 123 to username,empid sri,123 Thanks, Hema:confused: (2 Replies)
Discussion started by: Hemamalini
2 Replies

2. UNIX and Linux Applications

How to compare two files using shell script

hi experts please help me to compare two files which are in different directory file1<file will be master file> (/home/rev/mas.txt} ex x1 x2 file2 <will be in different folder> (/home/rev/per/.....) ex x3 x4 the filesinside per folder i need to compare with master file... (1 Reply)
Discussion started by: revenna
1 Replies

3. Shell Programming and Scripting

Shell Script to Compare Two Files

I have a directory with about 6 files that we receive regularly. these 6 files contain information for 3 different units, 2 for each unit. files related to a specific unit are named similarly with a change in number at the end of the file. the numbers should be sequential. for each grouping of... (3 Replies)
Discussion started by: scriptman237
3 Replies

4. Shell Programming and Scripting

help to compare data from file using shell script to c++ program

hello ....i am new in shell script..I have one shell script which read inputs from file...and second is c++ pgm..i call my script from c++ programm..to compare file values to c++ pgm value.. our shell script is shubhi.sh #! /bin/sh while read line do echo -e"$line" done<file1 this script... (1 Reply)
Discussion started by: shubhig15
1 Replies

5. Shell Programming and Scripting

Shell script to compare two files

I have two files; file A and file B. I need all the entries of file A to be compared with file B line by line. If the entry exists on file B, then save those on file C; if no then save it on file D Note :- all the columns of the lines of file A need to be compared, except the last two columns... (8 Replies)
Discussion started by: ajiwww
8 Replies

6. Shell Programming and Scripting

Compare two files using shell script

Hi i want to compare two files and i need the o/p of only difference here the files file1 achilles aedxbepo aedxbwdm01 aedxbwdm02 albedo amarice ambrister anakin anton argon artephius asgard avatar aymara (10 Replies)
Discussion started by: venikathir
10 Replies

7. Shell Programming and Scripting

Compare files with fields separated with semicolon

Dear experts I have files like ABD : 5869 events, relative ratio : 1.173800E-01 , sum of ratios : 1.173800E-01 VBD : 12147 events, relative ratio : 2.429400E-01 , sum of ratios : 3.603200E-01 SDF : 17000 events, relative ratio : 3.400000E-01 , sum of ratios : 7.003200E-01 OIP: 14984... (9 Replies)
Discussion started by: Alkass
9 Replies

8. Shell Programming and Scripting

Shell script to compare two files for duplicate..??

Hi , I had a requirement to compare two files whether the two files are same or different .... like(files contaisn of two columns each) file1.txt 121343432213 1234 64564564646 2345 343423424234 2456 file2.txt 121343432213 1234 64564564646 2345 31231313123 3455 how to... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies

9. Shell Programming and Scripting

SUM semicolon-seperated values from txt-file

Hello, (I'm a shell beginner) how can I sum the bold values of the following txt-file (values.txt) with bash shell. The result of the sum should be written in a new txt file (sum.txt): ... Thanks in advance (5 Replies)
Discussion started by: milu
5 Replies

10. UNIX for Beginners Questions & Answers

Shell Script to Compare Files and Email the differences

Hi, I have 2 files abc.txt and bdc.txt. I am using $diff -y abc.txt bcd.txt -- compared the files side by side I would like to write a Shell Script to cmpare the files side by side and print the results( which are not matched) in a side by side format and save the results in another... (10 Replies)
Discussion started by: vasuvv
10 Replies
Tcl_GetKeyedListKeys(3tclx)											       Tcl_GetKeyedListKeys(3tclx)

NAME
TclX_NewKeyedListObj, TclX_KeyedListGet, TclX_KeyedListSet, TclX_KeyedListDelete, TclX_KeyedListGetKeys - Keyed list management routines. SYNOPSIS
#include <tclExtend.h> Tcl_Obj * TclX_NewKeyedListObj (void); int TclX_KeyedListGet (Tcl_Interp *interp, Tcl_Obj *keylPtr, char *key, Tcl_Obj **valuePtrPtr); int TclX_KeyedListSet (Tcl_Interp *interp, Tcl_Obj *keylPtr, char *key, Tcl_Obj *valuePtr); int TclX_KeyedListDelete (Tcl_Interp *interp, Tcl_Obj *keylPtr, char *key); int TclX_KeyedListGetKeys (Tcl_Interp *interp, Tcl_Obj *keylPtr, char *key, Tcl_Obj **listObjPtrPtr); DESCRIPTION
These routines perform operations on keyed lists. See the Extended Tcl man page for a description of keyed lists. TclX_NewKeyedListObj Create and initialize a new keyed list object. Returns: A pointer to the object. TclX_KeyedListGet Retrieve a key value from a keyed list. Parameters: o interp - Error message will be return in result if there is an error. o keylPtr - Keyed list object to get key from. o key - The name of the key to extract. Will recusively process sub-keys seperated by `.'. o valueObjPtrPtr - If the key is found, a pointer to the key object is returned here. NULL is returned if the key is not present. Returns: o TCL_OK - If the key value was returned. o TCL_BREAK - If the key was not found. o TCL_ERROR - If an error occured. TclX_KeyedListSet Set a key value in keyed list object. Parameters: o interp - Error message will be return in result object. o keylPtr - Keyed list object to update. o key - The name of the key to extract. Will recusively process sub-key seperated by `.'. o valueObjPtr - The value to set for the key. Returns: TCL_OK or TCL_ERROR. TclX_KeyedListDelete Delete a key value from keyed list. Parameters: o interp - Error message will be return in result if there is an error. o keylPtr - Keyed list object to update. o key - The name of the key to extract. Will recusively process sub-key seperated by `.'. Returns: o TCL_OK - If the key was deleted. o TCL_BREAK - If the key was not found. o TCL_ERROR - If an error occured. TclX_KeyedListGetKeys Retrieve a list of keyed list keys. Parameters: o interp - Error message will be return in result if there is an error. o keylPtr - Keyed list object to get key from. o key - The name of the key to get the sub keys for. NULL or empty to retrieve all top level keys. o listObjPtrPtr - List object is returned here with key as values. Returns: o TCL_OK - If the zero or more key where returned. o TCL_BREAK - If the key was not found. o TCL_ERROR - If an error occured. Tcl Tcl_GetKeyedListKeys(3tclx)
All times are GMT -4. The time now is 11:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy