Skip to main content
27 events
when toggle format what by license comment
Jun 9, 2024 at 11:22 vote accept Anton Samokat
Jun 9, 2024 at 6:25 history undeleted Anton Samokat
May 12, 2024 at 10:44 history deleted Anton Samokat via Vote
May 11, 2024 at 22:46 comment added Vilinkameni When looking for information on the syntax of shell language, the first place to look should be the manual page of a particular shell. For most users, this will be man bash. All users of Unix-like systems should be familiar with programs man and less to browse manpages with. As stated, simply self-answering this trivial question (yes, it is trivial) is an abuse of the system. Any part of any manpage could be reposted as a question and answer if this was allowed.
May 11, 2024 at 13:48 history left closed in review Stephen Kitt
G-Man Says 'Reinstate Monica'
MC68020
Original close reason(s) were not resolved
May 11, 2024 at 12:13 history edited Anton Samokat CC BY-SA 4.0
removed info regarding request to open current question
May 11, 2024 at 12:09 comment added Anton Samokat @muro I've proposed this name: How to specify AND / OR operators (conditions) for case statement? What is shell case syntax?. Waiting for approval.
May 11, 2024 at 11:54 comment added muru @AntonSamokat for the latter you are welcome to suggest an edit to that question
May 11, 2024 at 11:34 comment added Anton Samokat @muru Because of that I propose either to open the current question or to update the name of the question AND operator in case statement to more relevant that it can be easily found for "OR condition". For example to: "AND / OR operators in case statement. Shell case syntax."
May 11, 2024 at 11:28 comment added Anton Samokat @muru It is not possible get results for search query "OR operator for case statement" both in search engine and here on Unix Stackexchange. And when I needed that information I did not come up with the idea that I must search by "AND operator for case statement" like query.
May 11, 2024 at 11:11 comment added Anton Samokat @muru I have the same links in the search results but there are two problems with them: 1) They do not have full case syntax like you provide with the link in answer for the current question. 2) Examples there written for #!/bin/bash, not for #!/bin/sh. Probably they also will be working in sh but I do not know. And I'm interested specifically in general POSIX case syntax.
May 11, 2024 at 10:30 comment added muru As for reopening, on the one hand, you're right that question asking for an OR statement and one asking for an AND statement are different, but on the other hand IMO any reasonable person searching for an "OR operator" for a case statement would look at a post on "AND operator"for case statements simply because the two are so related that it's highly likely one will mention the other. One does not simply ignore related concepts in search results because search quality in general is that bad. I'd prefer just having one post that discusses both, whether that be this one or the duplicate.
May 11, 2024 at 10:29 comment added muru @AntonSamokat the problem with search results is that they vary a bit. From your link in a private window, the very first result for me is howtogeek.com/766978/how-to-use-case-statements-in-bash-scripts which contains an entire section on "Using Multiple Patterns in a Clause", the second is a very short tutorial so doesn't mention anything too complicated, and the third has "The | operator separates multiple patterns" in the second section itself.
S May 11, 2024 at 9:29 review Reopen votes
May 11, 2024 at 13:48
S May 11, 2024 at 9:29 history edited Anton Samokat CC BY-SA 4.0
added request to open the question Added to review
May 11, 2024 at 9:22 comment added Anton Samokat @G-ManSays'ReinstateMonica' Also I disagree that the current question is a duplicate of AND operator in case statement. But after me accepting proposed by you related question the system marked the current question as duplicate and closed it. I think it is better to open it since obviously they are two different questions. If you have rights to open question please consider to open it.
May 11, 2024 at 9:16 history edited Kusalananda
edited tags
May 11, 2024 at 9:15 comment added Anton Samokat I've updated title of the question so it will be more relative and more simple to find by search queries
May 11, 2024 at 9:12 history edited Anton Samokat CC BY-SA 4.0
updated the title to be more related for search queries
May 11, 2024 at 9:09 comment added Anton Samokat @G-ManSays'ReinstateMonica' That is why I thought that It is right thing to do to a bit simplify search of the answer for the next researchers by creating this question.
May 11, 2024 at 9:08 comment added Anton Samokat I kindly disagree about "dumb question". Dumb question in my understanding is the question answer to which can be easily found. And I have not easily succeeded with this. The first three results from googling "shell case syntax" do not mention syntax for | (OR) operator. Here on Unix Stackexchange was only related question that you've mentioned - AND operator in case statement. And thanks to it I found right link to the case syntax.
May 11, 2024 at 8:47 history closed G-Man Says 'Reinstate Monica'
CommunityBot
Duplicate of How to specify AND / OR operators (conditions) for case statement?
May 10, 2024 at 23:49 review Close votes
May 11, 2024 at 8:55
May 10, 2024 at 23:30 comment added G-Man Says 'Reinstate Monica' Note that we explicitly allow and encourage self-answered questions, and we tolerate (if you’ll pardon the phrase) “dumb questions”.  But asking and self-answering a question that is trivially answered by reading the documentation strikes me as abuse of the mechanism.
May 10, 2024 at 23:30 comment added G-Man Says 'Reinstate Monica' Does this answer your question? AND operator in case statement?     No, it’s not the same question, but it does contain the answer to this question.
S May 10, 2024 at 14:08 answer added Anton Samokat timeline score: -1
S May 10, 2024 at 14:08 history asked Anton Samokat CC BY-SA 4.0