{"action":"opened","issue":{"url":"https://api.github.com/repos/l3tnun/EPGStation/issues/181","repository_url":"https://api.github.com/repos/l3tnun/EPGStation","labels_url":"https://api.github.com/repos/l3tnun/EPGStation/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/l3tnun/EPGStation/issues/181/comments","events_url":"https://api.github.com/repos/l3tnun/EPGStation/issues/181/events","html_url":"https://github.com/l3tnun/EPGStation/issues/181","id":387343324,"node_id":"MDU6SXNzdWUzODczNDMzMjQ=","number":181,"title":"\"recordedEndCommand\"でsedを使った文字列置換に失敗する","user":{"login":"tokohito","id":24762095,"node_id":"MDQ6VXNlcjI0NzYyMDk1","avatar_url":"https://avatars3.githubusercontent.com/u/24762095?v=4","gravatar_id":"","url":"https://api.github.com/users/tokohito","html_url":"https://github.com/tokohito","followers_url":"https://api.github.com/users/tokohito/followers","following_url":"https://api.github.com/users/tokohito/following{/other_user}","gists_url":"https://api.github.com/users/tokohito/gists{/gist_id}","starred_url":"https://api.github.com/users/tokohito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tokohito/subscriptions","organizations_url":"https://api.github.com/users/tokohito/orgs","repos_url":"https://api.github.com/users/tokohito/repos","events_url":"https://api.github.com/users/tokohito/events{/privacy}","received_events_url":"https://api.github.com/users/tokohito/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-04T15:33:48Z","updated_at":"2018-12-04T15:33:48Z","closed_at":null,"author_association":"NONE","body":"### 環境\r\n* Version of EPGStation: `1.2.3`\r\n* Version of Mirakurun: `2.7.4`\r\n* Version of Node: `v8.14.0`\r\n* Version of NPM: `6.4.1'`\r\n* OS: Ubuntu18.04.1\r\n* Architecture: x64\r\n\r\n### Issue\r\nお世話になっております。\r\n\"recordedEndCommand\"で録画後に実行しているシェルスクリプトにsedを使った\r\n文字列置換を使用しているのですが、yオプションが意図した通りに機能しません。\r\n\r\n-----\r\n#!/usr/bin/env bash\r\nexport LANG=en_US.UTF-8\r\necho \"ターミナル文字コード\" | nkf -g>> \"debug.txt\"\r\nfilename=\"${RECPATH##*/}\"\r\nfilename=\"${filename%.*}\"\r\nfilename=`echo \"${filename}\" | sed 's/　/\\ /g'`\r\necho filename: \"${filename}\">> \"debug.txt\"\r\n\r\nfilename=`echo \"${filename}\" | sed 'y/ＡＢＣ/ABC/'`\r\necho filename: \"${filename}\">> \"debug.txt\"\r\n-----\r\n\r\n全角<->半角置換しようとした際に、上記の例ですとsオプションで\r\n1文字ずつ置換する分には問題ないのですが、yオプションで\r\n置換しようとすると変数がnullになってしまいます。\r\n(指定文字数の大小、置換元か置換先かは関係なし)\r\n全角を含まない指定であれば、yオプションでも問題ありません。\r\nnkf -gの出力結果はUTF-8になっています。\r\n\r\nおま環のような気もしますし、sオプションを使えば\r\n回避も可能ではありますが、確認いただけますでしょうか。\r\n\r\n以上、よろしくお願いします。\r\n"}}
{"actor":{"display_login":"tokohito"}}