I recently came across this question and found it littered with bad answers. I thusly downvoted and flagged three of them as VLQ. Reviewing my flags today, I found out that one was marked helpful while the other two were declined, and I'm now flagging-banned (which is curious, as my last declined flag was more than 2 months ago).
The question asks for a way of removing the last file extension from a filename in bash. Here are the full two answers that are apparently not very low quality for such a question:
using grep, and regular expression
For starters, this answer has an earlier revision in which it was a clarification request (and thus NAA), as the first question revision didn't specify the language. Once OP specified the language, the "answer" was edited it into its current state, which is complete BS for anybody who knows a bit of bash. I'm not even aware of any way to manipulate text with grep, and even if it were possible, using grep to strip a file extension would amount to attempt sewing with a fork instead of a needle. The answerer also completely ignored OPs timely request for clarification. I figure the poster was out of their league and simply wrote random crap which they figured might potentially be useful.
The other answer reads:
str.substring(0, str.lastIndexOf('.'))
Seems fine - except for the fact that it's JavaScript instead of bash! I wrote a comment stating it's the wrong language (although I initially misidentified it as python, which is rather embarrassing - the str
probably threw me off).
I'm stil under the impression that both answers have severe content problems, cannot be improved by editing (only by removing all of the old text and replacing it with something else) and should be deleted. The following questions arise:
- Is there a reason why I should not have flagged the answers?
- Assuming I was correct in flagging the answers, should I have done anything different to ensure correct handling of the flags? Was the "that's the wrong language" comment not enough?
- Is it possible to get unbanned so that I can flag more crap?