{"action":"opened","issue":{"url":"https://api.github.com/repos/ShaneMcC/vyatta-tinc/issues/6","repository_url":"https://api.github.com/repos/ShaneMcC/vyatta-tinc","labels_url":"https://api.github.com/repos/ShaneMcC/vyatta-tinc/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/ShaneMcC/vyatta-tinc/issues/6/comments","events_url":"https://api.github.com/repos/ShaneMcC/vyatta-tinc/issues/6/events","html_url":"https://github.com/ShaneMcC/vyatta-tinc/issues/6","id":134262332,"number":6,"title":"Problems writing public and private keys","user":{"login":"sidneicarlos","id":16151394,"avatar_url":"https://avatars.githubusercontent.com/u/16151394?v=3","gravatar_id":"","url":"https://api.github.com/users/sidneicarlos","html_url":"https://github.com/sidneicarlos","followers_url":"https://api.github.com/users/sidneicarlos/followers","following_url":"https://api.github.com/users/sidneicarlos/following{/other_user}","gists_url":"https://api.github.com/users/sidneicarlos/gists{/gist_id}","starred_url":"https://api.github.com/users/sidneicarlos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sidneicarlos/subscriptions","organizations_url":"https://api.github.com/users/sidneicarlos/orgs","repos_url":"https://api.github.com/users/sidneicarlos/repos","events_url":"https://api.github.com/users/sidneicarlos/events{/privacy}","received_events_url":"https://api.github.com/users/sidneicarlos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-17T12:07:36Z","updated_at":"2016-02-17T12:07:36Z","closed_at":null,"body":"```\r\nformatKey() {\r\n        TYPE=\"${1}\"\r\n        KEY=\"${2}\"\r\n\r\n        echo \"\"\r\n        echo \"-----BEGIN RSA ${TYPE} KEY-----\"\r\n        echo \"${KEY}\" | sed -r 's/(.{65})/\\1\\n/g'\r\n        echo \"-----END RSA ${TYPE} KEY-----\"\r\n}\r\n```\r\nSome tests and I found this:\r\n\r\n```\r\n$ a=\"MIIJKQIBAAKCAgEAycLwXe3lXQcm3xmuVdMg3G2CnUgskl1GkQZjJWdhdiAun4ZM/h1wqGgQkWTD7AGj60OE2ahYIBpMY+n7ofCBDXjV74AFIxEvQTX5deLD234x5o+0\"\r\n$ echo \"$a\" | sed -r 's/(.{65})/\\1\\n/g'\r\nMIIJKQIBAAKCAgEAycLwXe3lXQcm3xmuVdMg3G2CnUgskl1GkQZjJWdhdiAun4ZM/\r\nh1wqGgQkWTD7AGj60OE2ahYIBpMY+n7ofCBDXjV74AFIxEvQTX5deLD234x5o+0\r\n$ echo \"$a\" | sed -r 's/(.{64})/\\1\\n/g'\r\nMIIJKQIBAAKCAgEAycLwXe3lXQcm3xmuVdMg3G2CnUgskl1GkQZjJWdhdiAun4ZM\r\n/h1wqGgQkWTD7AGj60OE2ahYIBpMY+n7ofCBDXjV74AFIxEvQTX5deLD234x5o+0\r\n\r\n```\r\n\r\nI think the line could be \r\n`        echo \"${KEY}\" | sed -r 's/(.{65})/\\1\\n/g'`"}}