Bash case error


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Bash case error
# 8  
Old 08-06-2018
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)



Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums
# 9  
Old 08-06-2018
Code:
We are very sorry we are being forced to post this. 



We did very detailed analysis of our post and resulting discussion based on the original post where we asked for help to  resolve simple case command error issue. 



On the scale "good , bad and ugly"  - forum score is 

10% good ( case command returns value ) 

80 % bad 

10 % ugly 



The original cause of the error was newer discussed or resolved. 



Posting specific about our rating of the one sided discussion would be pointless and 

more waste of our time. 

We have learned our lesson and would ask to stop sending / posting instructions on how to write and keep our mouth shut so not to disturb this fine forum.

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Special case to skip function in bash menu

In the bash menu below if the variant that is inputted is in the format NM_004004.3:c.274G>T the below works perfectly. My question is if the variant inputted isNM_004004.3:-c.274G>T or NM_004004.3:+c.274G>T then the code as is will throw an error due to a biological issue. Is it possible to to... (1 Reply)
Discussion started by: cmccabe
1 Replies

2. Shell Programming and Scripting

BASH - case statement

Hi Gurus, I have the below BASH code which does not works for upper case alphabets except Z (upper case Z). What may be the reason. Also escape sequences like \n, \t, \b, \033(1m \033(0m (For bold letter) are not working. case $var in ) echo "Lower case alphabet" ;; ... (7 Replies)
Discussion started by: GaneshAnanth
7 Replies

3. Shell Programming and Scripting

Bash Case Issues..

Hi, I'm having some trouble with using "case...esac" in Bash. I've googled it and am stuggling to understand the syntax and how to do certain things. Firstly, I want to be able to choose a case based on a variable number For example, I have in my code a place where a user can enter... (2 Replies)
Discussion started by: Ste_Moore01
2 Replies

4. Shell Programming and Scripting

Bash case Statement and Using Line Anchors?

Hello All, I am writing a script that is to be placed on multiple servers, and of course I've started running into some compatibility issues for certain shell commands. The code below worked just fine on most of my machines except for a couple. Here I had 4 separate lines in my script that... (3 Replies)
Discussion started by: mrm5102
3 Replies

5. Shell Programming and Scripting

Problem using bash case statement

I have the following bash script and it is not accepting the lines "--"|"--""-") "--""-"") while do echo "Current Argument is ${1}" case "$1" in "--"|"--""-") echo "Argument is ${1}" shift # Skip ahead one to the next argument. ... (1 Reply)
Discussion started by: kristinu
1 Replies

6. Shell Programming and Scripting

Can you use logical operators in a case statement (bash)?

I'm pretty sure I already know the answer to this, but I want to make sure I'm not overlooking anything. I'm working on a log monitoring script and every 10 lines I want to display a summary of events. The thing is, there are a lot of possible events, that likely won't have happened, so I only want... (0 Replies)
Discussion started by: DeCoTwc
0 Replies

7. UNIX for Dummies Questions & Answers

How to change Case of a string(BASH Scripting)?

Is there any inbuilt functionality in Unix shell script so that i can able to convert lower case string input to an upper case? I dont want to use high level languages like java,python or perl for doing the job. (2 Replies)
Discussion started by: pinga123
2 Replies

8. Shell Programming and Scripting

bash case statement output help

greetings, I have a script that is taking input like this: a b c d aa bb aaa bbb ccc ddd and formating it to be like this: a b c d aa bb aaa bbb ccc ddd (4 Replies)
Discussion started by: adambot
4 Replies

9. Shell Programming and Scripting

Example of switch case in Bash

can anyone post a sample code for a switch case in shell (1 Reply)
Discussion started by: sumit the cool
1 Replies

10. Shell Programming and Scripting

bash regex =~ case insensetive, possible?

It can get very annoying that bash regex =~ is case-sensetive, is there a way to set it to be case-insensetive? if ]; then echo match else echo no match fi (8 Replies)
Discussion started by: TehOne
8 Replies
Login or Register to Ask a Question