Sponsored Content
Full Discussion: Compare
Top Forums UNIX for Beginners Questions & Answers Compare Post 302964928 by RudiC on Thursday 21st of January 2016 07:33:14 AM
Old 01-21-2016
Quote:
Originally Posted by loktamann
.
.
.
and tell me that test1 123 is not the same as test1 111
.
.
.
Try an extension to RavinderSingh13's proposal:
Code:
awk 'FNR==NR{A[$1]=$0;next} ($1 in A){print A[$1], $0, A[$1]!=$0?"different":""}' file1  file2
test1 123 test1 111 different
test2 200 test2 200

This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Compare

Hi How can I compare two sendmail.cf from two different systems? We are using Tru64 Unix Thank you, Syed_45 (2 Replies)
Discussion started by: Syed_45
2 Replies

2. Shell Programming and Scripting

How to compare it ??

Hi how do you compare it in ksh ALINES=$(cat AFILE | wc -l) BFIRST=$(head -1 BFILE) I got ALINES=9 and BFRIST=records'9' I want 9=9 , how do you write BLINES=9 from records'9' so I can say ALINES==BLINES Thanks (4 Replies)
Discussion started by: sabercats
4 Replies

3. Shell Programming and Scripting

Compare two arrays in sh or compare two fields

I want a soultion to compare two arrays in sh with an easy way.I want a solution to synchrose users between different AIX servers where no NIS is available. All users are meant to be same on all 10 servers. So the approach is to consider first server as master user repository and whatever the users... (0 Replies)
Discussion started by: rijeshpp
0 Replies

4. Shell Programming and Scripting

compare between the two dates

Hi all, How to check whether the given the two dates is minimal. example: Date 1 : 23-03-2008 with timestamp Date 2: 20-03-2008 With tmestamp I want to compare the twodates and which it gives the minimum date i wnat to get the output like this below output: the Date2 is... (1 Reply)
Discussion started by: balaji23_d
1 Replies

5. Shell Programming and Scripting

Compare

grep '^.......$' /usr/dict/words | cut -c1,2,3,5,6,7 This gives a list of 6 character strings, some are words some not. Any suggestions on how I can get rid of the ones that aren't words and print the ones that are? I have tried look with no luck yet. (1 Reply)
Discussion started by: kezkez
1 Replies

6. Shell Programming and Scripting

Require compare command to compare 4 files

I have four files, I need to compare these files together. As such i know "sdiff and comm" commands but these commands compare 2 files together. If I use sdiff command then i have to compare each file with other which will increase the codes. Please suggest if you know some commands whcih can... (6 Replies)
Discussion started by: nehashine
6 Replies

7. Shell Programming and Scripting

value compare

Hi, file contains only one row. END OF FILE. ROW COUNT: 8,9 We need to check the file contains exact string "END OF FILE. ROW COUNT: " if yes, get the 8,9 values then compare if both are equal print the "equal" if not "notequal". Thanks, (4 Replies)
Discussion started by: bmk
4 Replies

8. Shell Programming and Scripting

Need help on compare

Hi, I need your help with the below mentioned issue: I have 2 files say, file1.txt: id|no|cde a|4|7 b|3|2 c|8|8 d|8|9 file2.txt: id|no|cde a|4|6 b|2|2 c|8|8 (1 Reply)
Discussion started by: lkeswar
1 Replies

9. UNIX for Dummies Questions & Answers

Compare data - Match first column and compare second

Hi guys, looking for some help with a way to compare data in two files but with some conditions. example, File 1 consists of site1,10.1.1.1 site2,20.2.2.2 site3,30.3.3.3 File 2 contains site1,l0.1.1.1 site2,50.1.1.1 site3,30.3.3.3 site4,40.1.1.1 I want to be able to match the... (1 Reply)
Discussion started by: mutley2202
1 Replies

10. Shell Programming and Scripting

How to compare 1, 1.0 and 1.00 ?

Hi, I have a file containing a list of codes, followed by a description, such as below: 008.0,ESCHERICHIA COLI 008.1,ARIZONA 008.2,AEROBACTER AEROGENES 008.6,ENTERITIS DUE TO SPECIFIED VIRUS 008.8,OTHER ORGANISM, NOT ELSEWHERE CLASSIFIED 008,INTESTINAL INFECTIONS DUE TO OTHER ORGANISMSI... (6 Replies)
Discussion started by: carlr
6 Replies
GPG-ZIP(1)						      General Commands Manual							GPG-ZIP(1)

NAME
gpg-zip - encrypt or sign files into an archive SYNOPSIS
gpg-zip [OPTIONS] filename1 [filename2, ...] directory1 [directory2, ...] DESCRIPTION
This manual page documents briefly the gpg-zip command. gpg-zip encrypts or signs files into an archive. It is an gpg-ized tar using the same format as PGP's PGP Zip. OPTIONS
-e, --encrypt Encrypt data. This option may be combined with --symmetric (for output that may be decrypted via a secret key or a passphrase). -d, --decrypt Decrypt data. -c, --symmetric Encrypt with a symmetric cipher using a passphrase. The default symmetric cipher used is CAST5, but may be chosen with the --cipher-algo option to gpg(1). -s, --sign Make a signature. See gpg(1). -r, --recipient USER Encrypt for user id USER. See gpg(1). -u, --local-user USER Use USER as the key to sign with. See gpg(1). --list-archive List the contents of the specified archive. -o, --output FILE" Write output to specified file FILE. --gpg GPG Use the specified command instead of gpg. --gpg-args ARGS Pass the specified options to gpg(1). --tar TAR Use the specified command instead of tar. --tar-args ARGS Pass the specified options to tar(1). -h, --help Output a short usage information. --version Output the program version. DIAGNOSTICS
The program returns 0 if everything was fine, 1 otherwise. EXAMPLES
Encrypt the contents of directory mydocs for user Bob to file test1: gpg-zip --encrypt --output test1 --gpg-args -r Bob"" mydocs List the contents of archive test1: gpg-zip --list-archive test1 SEE ALSO
gpg(1), tar(1) AUTHOR
Copyright (C) 2005 Free Software Foundation, Inc. Please report bugs to <bug-gnupg@gnu.org>. This manpage was written by Colin Tuckley <colin@tuckley.org> and Daniel Leidert <daniel.leidert@wgdd.de> for the Debian distribution (but may be used by others). November 2006 GPG-ZIP(1)
All times are GMT -4. The time now is 11:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy