I am new to unix so wanted to understand how this(mentioned below) can be done.I have an input file like this:Example for input file:a|a1|a2|a3|a4|a5|...|a29|$2342a|a1|a2|a3|a4|a5|...|a29|$2343a|a1|a2|a3|a4|a5|...|a29|$2344a|a1|a2|a3|a4|a5|...|a29|$2345b|b1|b2|b3|b4|b5|...|b29|$100c|c1|c2|c3|c4|c5|...|c29|$12And another file has data like this:a|a1|a2|a3|a4|a5|...|a29|$2342|123|1.0|21.0b|b1|b2|b3|b4|b5|...|b29|$100|12567|16.0|31.0c|c1|c2|c3|c4|c5|...|c29|$12|6213|1.9|1.1I am trying to get the final output using these two files as mentioned below:a|a1|a2|a3|a4|a5|...|a29|$2342|123|1.0|21.0a|a1|a2|a3|a4|a5|...|a29|$2343|123|1.0|21.0a|a1|a2|a3|a4|a5|...|a29|$2344|123|1.0|21.0a|a1|a2|a3|a4|a5|...|a29|$2345|123|1.0|21.0b|b1|b2|b3|b4|b5|...|b29|$100|12567|16.0|31.0c|c1|c2|c3|c4|c5|...|c29|$12|6213|1.9|1.1I think if we can compare the column before # value and if found to be same then append value from 2nd file into 1st one.Please help.
Compare n no of column values between each record in 2 files and apend data from file 2 to file 1
bash