This is part of my assignment and two of the assignment "problems" are I cant use switches and its gotta be bash (not a problem really). Its my first bash program so you'll have to go easy as this is probably quite a basic question.
Ive got two database files called vehicle and customer. Heres an example of one customer in the customer file, there are others in it obviously.
customer number 3
first name steve
surname johnson
post code wm83ee
telephone number 0800123456
my vehicle database look like this:
car reg no g428nug
colour green
model audi
year of manufacture 1991
selling price 200
sold flag Y
customer number 3
I've done nearly all the script apart from this section and i dont really know where to start besides grep, but i need multiple instances of grep to search and output lots of different things and then compare them with the other file. Heres the bit I'm stuck on:
"Perform an audit (i.e. consistency check) of the database. You will identify all customer records with no corresponding vehicle record and all vehicle records marked as sold with no corresponding customer record."
I think my good old cisco lecturer who hates programming would also be impressed with an output like echo "records are consistant" or records are crap, whatever. Only way i can think of doing this is a switch but its not allowed
Any help at all, even a clue as to how I'd do this would be perfect.
Thanks a LOT!