BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] Please help with a BASH puzzle
- Subject: [Discuss] Please help with a BASH puzzle
- From: david at thekramers.net (David Kramer)
- Date: Fri, 23 Aug 2019 18:51:43 -0400
- In-reply-to: <cccf29d6-362e-020f-f28b-d0e950ee002f@horne.net>
- References: <cccf29d6-362e-020f-f28b-d0e950ee002f@horne.net>
Are these hex numbers?? bc can convert hex to decimal and do hex math.? The hard part is calculating the next value, and here's an example of doing that. nextValue=`echo "obase=16; ibase=16; ${lastValue} + 1" | bc` Then all you need to do is compare whether the next line you read is equal to nextValue. On 8/23/19 6:32 PM, Bill Horne wrote: > Thanks for reading this: I appreciate your time. > > I'm trying to do something that should be very easy to do, and yet I > can't remember how to do it, and I'm asking for help. > > I have an alpha-numeric, sorted file, that looks like this: > > 01AA > > 01AB > > 01AC > > 01AE > > 01AF > > .. etc. > > I'm trying to remember what BASH utility, script, or? command would > flag the missing value (in this case, "01AD"). There are, of course, > any number of ways to program a solution, but I can't remember which > of the BASH utilities will do it. All suggestion welcome, and thanks > in advance. > > Bill Horne > > _______________________________________________ > Discuss mailing list > Discuss at blu.org > http://lists.blu.org/mailman/listinfo/discuss
- Follow-Ups:
- [Discuss] Please help with a BASH puzzle
- From: bill at horne.net (Bill Horne)
- [Discuss] Please help with a BASH puzzle
- References:
- [Discuss] Please help with a BASH puzzle
- From: bill at horne.net (Bill Horne)
- [Discuss] Please help with a BASH puzzle
- Prev by Date: [Discuss] Please help with a BASH puzzle
- Next by Date: [Discuss] Please help with a BASH puzzle
- Previous by thread: [Discuss] Please help with a BASH puzzle
- Next by thread: [Discuss] Please help with a BASH puzzle
- Index(es):