Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!usenet.stanford.edu!not-for-mail From: Val Krem Newsgroups: gnu.bash.bug Subject: combine and .. Date: Tue, 19 Jan 2016 02:31:07 +0000 (UTC) Lines: 63 Approved: bug-bash@gnu.org Message-ID: References: <452386707.2040775.1453170667903.JavaMail.yahoo.ref@mail.yahoo.com> Reply-To: Val Krem NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: usenet.stanford.edu 1453170676 16415 208.118.235.17 (19 Jan 2016 02:31:16 GMT) X-Complaints-To: action@cs.stanford.edu To: "Bug-bash@gnu.org" , "john.archie.mckown@gmail.com" , Greg Wooledge Envelope-to: Bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1453170668; bh=DsgS7cO0heo2yeg+3I4qBCZH268CywpjKzCJLCwJy1Q=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=I0ph7Fdp+3bI1/sJ154GNFSgFhOCBVkNtX9/ZMc3S4Xt+Wjem6KsjBvDxTguGSlyvRA0RyI/ubPby3ggnkb/oYsh3jHxT64oKcknXUwdtXvNocEUhPyJYCt9eyyUaU0fTdbbi+Lk8KxPZTwLqy/TF7cbtOFBEKb9Q7iQCrhnmGdk0oOvJGJkSKEz6zXojLcgSl7I0cMCi8W00BMefG3A82hdgW94mefPZ0ZEg14VNZcJww0vih8wqVxum1tMA6vDzV9YYJyr87zDRAeCFMCapkT+cxAFO9DnMDZPXmF7ulVh08/KUW3mqrxagUAzh8oKD81m+hFzxF+9RVOX0ZdElA== X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 864296.16312.bm@omp1018.mail.bf1.yahoo.com X-YMail-OSG: uulMWt4VM1k4UBBT7bsGSbx2IiGXYBzj.09DBAbTEYl4a0rYZ8GgRx7sJOTkLpD l1XTEWexLliihi9WnuTfkx7mmK2zm.ZT6I1wcxeZv4__ERlkokCmX7mKTvtLpvB5ZT5dUjPll8PG SIQo4yt35dDnx_HPWz_zEwfX4FQWGMrMTThww1drjcrEu9UGt1P5_FsbEhXYXYh3BqV_Rqc0jYBm Zg3VGSlGDpp7bD0kCjV95bUfdP__paSju4tDx9uxe1x1ESdSABZOAoSnusfnwrjhUlHYYquq84CE xpLwSmQb9gr8RkAAqM2FZU_FeKHDOirgaAcn5LCFhcPa2gELoe7QK__xo5xG4UXTi8lzIB_TSPlg 7cCYpOjeJg8M5HYw990_6hUAEzAiSnxDD_GwYpcvLOkxPVnU59OWtL2R7g5zHRxtFNdN0tgkcbb7 i_pVvmVMSOw228yaeSPH59DnlA079qHGzvWcpmNGWCcGP0dLIHEo9th3kKMfjzKJJv4LGklp5QIP hPXVj Content-Length: 1921 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 216.109.114.202 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:12246 Hi John and all, I am trying to write a bash script to do the following small task I have two files and each file has two variables. File1 Name weight1 height1 Alex 220 67 Tom 320 75 Craig 180 71 John 186 65 File2 Name weight2 height2 Alex 226 69 Tom 320 75 Craig 170 70 Steve 420 80 Here are my objectives, 1. Combine the two files (file1 and file2) a) count and List the name(s) along with their weight and height that appear in file1 not in file2 Name Weight height eg John 186 65 b) count and list the names(S) along with their weight and height that appear in file 2 but not in file1 Name Weight height Steve 420 80 c) for those that appear in both file 1 and file 2, I want some stat Name weight1 height1 weight2 height2 w_diff h_diff Alex 220 67 226 69 6 2 Tom 320 75 320 75 0 0 Craig 180 71 170 70 -10 -1 d) depending on the difference I want to list their names along with their weight and height i) increases in both variables Name weight1 height1 weight2 height2 w_diff h_diff Alex 220 67 226 69 6 2 ii) decreases in both variables Name weight1 height1 weight2 height2 w_diff h_diff Craig 180 71 170 70 -10 -1 iii) decreases in either of the variables (weight or height) not in this example. Thank you in advance val