sed
This commit is contained in:
parent
ee668eaa5f
commit
80f1cd121e
1 changed files with 2 additions and 2 deletions
4
x
4
x
|
@ -68,10 +68,10 @@ while read -r FQDN SSH_KEY_PATH; do
|
|||
echo "Error: can not export $FQDN config"
|
||||
exit 2
|
||||
fi
|
||||
echo "export $FQDN config."
|
||||
echo "export $FQDN config"
|
||||
ssh -n -i "$SSH_KEY_PATH" "$FQDN" "/export show-sensitive" > "config_${FQDN}.rsc"
|
||||
# entferne Datumszeile
|
||||
sed -i -r '/^# [0-9]{4}-[0-9]{2}-[0-9]{2}\s[0-9]{2}\:[0-9]{2}\:[0-9]{2}\sby\sRouterOS\s[0-9\s\.]+/d'
|
||||
sed -i -r '/^# [0-9]{4}-[0-9]{2}-[0-9]{2}\s[0-9]{2}\:[0-9]{2}\:[0-9]{2}\sby\sRouterOS\s[0-9\s\.]+/d' "config_${FQDN}.rsc"
|
||||
git add "config_${FQDN}.rsc"
|
||||
git commit -m "update config_${FQDN}"
|
||||
done <<< "$DEVICES"
|
||||
|
|
Loading…
Reference in a new issue