An Etymological Dictionary of the German Language/Annotated/ob

ob (1.), preposition and adverb, ‘over, above,’ from Middle High German obe, ob, preposition and adverb, ‘aloft, above, across,’ so too Old High German oba; compare Anglo-Saxon ufe-weard, ‘upper.’ Modern High German ob has been retained chiefly in compounds such as Obacht and Obdach. Allied to oben.

ob (2.), conjunction, ‘whether, if,’ from Middle High German obe, ob, op, conjunction, ‘if, as if, although, whether,’ so too Old High German oba, with the earlier variant ibu, ‘if, whether’; corresponding to Old Saxon ef, of (Anglo-Saxon gif, English if). Gothic ibai, iba, ‘whether then, perhaps, probably, lest perhaps,’ with the corresponding negative nidai, niba, ‘unless.’ The Old High German form is the dative and instrumental of iba, feminine, ‘doubt, condition,’ Old Icelandic ife, efe, masculine, and if, ef, neuter, ‘doubt.’ Hence the literally meaning of the conjunction is ‘in doubt, on condition.’