Shell-model calculations on Ni and Cu isotopes