Closed slarge closed 5 years ago
"Sanitizer" code:
all_files <- list.files(pattern = "\\.[R-r]$", include.dirs = TRUE, recursive = TRUE)
for(i in 1:length(all_files)){
dat <- readLines(all_files[i], warn = FALSE)
if(length(grep("tech-memo", dat)) >= 1) {
dat <- gsub("tech-memo", "tech-doc", dat)
cat(paste0(all_files[i], "\n"))
file_connection <- file(all_files[i])
writeLines(dat, file_connection)
close(file_connection)
} else if(length(grep("tech-memo", dat)) == 0) {
dat <- NULL
}
}
Need to change "tech-memo" to "tech-doc"
Originally posted by @slarge in https://github.com/NOAA-EDAB/tech-doc/issues/37#issuecomment-474044622