[Discuss] Please help with a BASH puzzle

Bill Ricker bill.n1vux at gmail.com
Fri Aug 23 20:53:05 EDT 2019


>
> .
>
> If you know what should be in the file then create a new file with the
> correct data


Or, itemize everything that could be in the file

and use diff to find the differnces.
>

If files are sorted, comm (1) is more efficient and has different output
options than diff (1).

If necessary, lc or uc the files.

The sort and comm must be wrto the same Locale Collation. LC_ALL=C for both
will assure that.

An awk, perl, or python generator command can be piped to one of the two
inputs of comm in modern bash via <() command syntax. I often put
canonicalizing commands in both.


More information about the Discuss mailing list