#!/bin/bash
# Recursively change all info files:
# del line beginning with @ in file "info" recursively, copy to "info.txt"
# lets file "info" untouched
# see: https://askubuntu.com/questions/444551/get-absolute-path-of-files-using-find-command
#      https://stackoverflow.com/questions/4321456/find-exec-a-shell-function
#
# 191215

function dosomething () {
   dir=$(dirname $1)
   sed '/^@/d' $1 > ${dir}/info.txt
}

export -f dosomething

find "$(pwd -P)" -name "info" -exec bash -c 'dosomething "{}"' \;   # ok


