If I found a post that properly quotes code (gives attribution) from an original source, is it ok if I attribute to that post only, or do I need to give attribution to the original source?
For instance: I found this StackExchange answer: https://unix.stackexchange.com/a/4533/92787 :
Remove color codes (special characters) with sed
sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"
Which properly links to the original source: http://www.commandlinefu.com/commands/view/3584/remove-color-codes-special-characters-with-sed
Is it ok if in my code I put only this:
# sed expression taken from https://unix.stackexchange.com/a/4533/92787
[my code] .... sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" ... [my code]