added edit (as per post) and support for osx

Updated to update a specific line
also added support for osx.