#!/bin/bash # Script to remove use of atoi and atof that # are less rigorous in throwing exceptions. # \author Hans J. Johnson git grep -l "\ *(" |grep -E "(.cxx|.cpp|.cc|.h|.hxx|.hpp|.txx)" > /tmp/atoi_files.list for ff in $(cat /tmp/atoi_files.list); do sed -i "" 's/ atoi *(/ std::stoi(/g' $ff done git grep -l "\ *(" |grep -E "(.cxx|.cpp|.cc|.h|.hxx|.hpp|.txx)" > /tmp/atoi_files.list for ff in $(cat /tmp/atof_files.list); do sed -i "" 's/ atof *(/ std::stod(/g' $ff done cat > /tmp/COMMIT_MESSAGE_atoi <