tmpf=$(mktemp)
{
printf "%s" "Host * "
- sed -n '/^Host /h;/^IdentityFile .*\/home/{g;s/^Host//;s/ / !/gp}' /p/c/subdir_files/.ssh/config-static | tr '\n' ' '
- echo
+ sed -n '/^Host /h;/^IdentityFile .*\/home/{g;s/^Host//;s/ / !/gp}' /p/c/subdir_files/.ssh/config-static | tr '\n' ' ' \
+ | sed -r 's/ *$/\n/'
echo "IdentityFile ~/.ssh/work"
} >$tmpf
cedit -e work-identity /p/c/subdir_files/.ssh/config-static <$tmpf