{"action":"opened","issue":{"url":"https://api.github.com/repos/micheloosterhof/cowrie/issues/777","repository_url":"https://api.github.com/repos/micheloosterhof/cowrie","labels_url":"https://api.github.com/repos/micheloosterhof/cowrie/issues/777/labels{/name}","comments_url":"https://api.github.com/repos/micheloosterhof/cowrie/issues/777/comments","events_url":"https://api.github.com/repos/micheloosterhof/cowrie/issues/777/events","html_url":"https://github.com/micheloosterhof/cowrie/issues/777","id":333198777,"node_id":"MDU6SXNzdWUzMzMxOTg3Nzc=","number":777,"title":"local/exported variable handling in shell","user":{"login":"micheloosterhof","id":1063043,"node_id":"MDQ6VXNlcjEwNjMwNDM=","avatar_url":"https://avatars0.githubusercontent.com/u/1063043?v=4","gravatar_id":"","url":"https://api.github.com/users/micheloosterhof","html_url":"https://github.com/micheloosterhof","followers_url":"https://api.github.com/users/micheloosterhof/followers","following_url":"https://api.github.com/users/micheloosterhof/following{/other_user}","gists_url":"https://api.github.com/users/micheloosterhof/gists{/gist_id}","starred_url":"https://api.github.com/users/micheloosterhof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micheloosterhof/subscriptions","organizations_url":"https://api.github.com/users/micheloosterhof/orgs","repos_url":"https://api.github.com/users/micheloosterhof/repos","events_url":"https://api.github.com/users/micheloosterhof/events{/privacy}","received_events_url":"https://api.github.com/users/micheloosterhof/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-18T09:40:26Z","updated_at":"2018-06-18T09:40:26Z","closed_at":null,"author_association":"OWNER","body":"Scenario 1\r\n```\r\n$ A=5\r\n$ echo $A\r\n5\r\n```\r\n\r\nScenario 2:\r\n```\r\n$ A=4 ls\r\n$ echo $A\r\n5\r\n```\r\n\r\nThe output is different. The current code works for scenario #2, \r\n\r\nTo summarize:\r\n```$ A=5``` sets local shell variable to 5 but does not export it to commands\r\n```$ env A=5 ls``` runs ls commands and sets A to 5 in the environment of the ls command only, not in the shell.\r\n```$ A=5 ls``` runs ls commands and sets A to 5 in the environment of the ls command only, not in the shell.\r\n```$ export A=5; ls``` sets A=5 in environment and passes it to all commands afterwards\r\n```export``` for a list of exported variables."}}
{"actor":{"display_login":"micheloosterhof"}}