i'm not good in scripting and asking for your help.
With this script i change some text parts in diffent datafiles. It works without problems, but i need to get some informations about what changes in wich datafiles happend. This could be in character of a log file oder a simly report after the script has done the changes.
#!/bin/bash
DATMASKE='*.cfg'
read serveralt
read serverneu
echo Bisherige Bezeichnung: $serveralt , neue Bezeichung: $serverneu
for x in $(find /home/test -type f -iname "$DATMASKE"); do
awk ' { gsub("'$serveralt'","'$serverneu'"); print > FILENAME } ' $x
done
I didn't find a solution yet by googling. thanks a lot for your help