Using getopt_long with more than just a one letter character code.


 
Thread Tools Search this Thread
Top Forums Programming Using getopt_long with more than just a one letter character code.
# 8  
Old 03-27-2012
Not usually, no.
# 9  
Old 03-27-2012
Quote:
Originally Posted by cue
Not usually, no.
You mean options are case sensitive?
For example, having the option, --Jpoly, if the user writes --jPoly, the script should return an error?

Are there any standard options where the option case does not matter?
# 10  
Old 03-27-2012
Quote:
Originally Posted by kristinu
You mean options are case sensitive?
Yes they are case sensitive.
Quote:
Originally Posted by kristinu
For example, having the option, --Jpoly, if the user writes --jPoly, the script should return an error?
Yes it should return an error and this is rooted in the unix philosophy that the case of characters is significant.
Quote:
Originally Posted by kristinu
Are there any standard options where the option case does not matter?
None that I have ever come across in the unix world...or linux for that matter.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed searches a character string for a specified delimiter character, and returns a leading or traili

Hi, Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank. Text file : "1"|"ExternalClassDEA519CF5"|"Art1" "2"|"ExternalClass563EA516C"|"Art3" "3"|"ExternalClass305ED16B8"|"Art9" ... ... ... (2 Replies)
Discussion started by: fspalero
2 Replies

2. Shell Programming and Scripting

Replace specific letter in a file by other letter

Good afternoon all, I want to ask how to change some letter in my file with other letter in spesific line eg. data.txt 1 1 1 0 0 0 0 for example i want to change the 4th line with character 1. How could I do it by SED or AWK. I have tried to run this code but actually did not... (3 Replies)
Discussion started by: weslyarfan
3 Replies

3. Programming

Problem of first letter

i have function to send arabic notification email to employee , but when i open the email in outlook i see that the first letter of the caption (employee name) is trimed , but when i open the same email from other workstation i see the caption is complete (working fine) (1 Reply)
Discussion started by: AimyThomas
1 Replies

4. Shell Programming and Scripting

sort -t option causing code to fail need ASCII character

Hello, When I run this UNIX code without the -t option it gives me the desired results. The code keeps the record with the greatest datetime based on the key columns. I sort it first then sort it again with the -u option, that's it. I need to have a variable to specify an ASCII character... (2 Replies)
Discussion started by: script_op2a
2 Replies

5. Shell Programming and Scripting

read in a file character by character - replace any unknown ASCII characters with spa

Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/ Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies

6. UNIX for Dummies Questions & Answers

If first letter of name is a-m do this if n-x do something else

so if I run echo $USER and the name is smithr i want to run command B to run because s is after m in the alphabet, but if the user is aldap I want command A to run because their first initial in the user name is in the first half of alphabet. how please? (2 Replies)
Discussion started by: glev2005
2 Replies

7. Shell Programming and Scripting

what is dead.letter ??

Hi all can you please help me what is dead.letter file ? when it is created ? for the first time i have seen this file getting created in my current directory? I am using SunOs. Any IDEA ?? (2 Replies)
Discussion started by: jambesh
2 Replies

8. UNIX for Dummies Questions & Answers

SORT by letter

Hello again, Since I am UNIX new user I have this question: I have this file: 1 A A 1 A A 1 A A 1 B B 1 B B 1 X X 1 X X 1 C C Could anyone of you help me to sort this file like this: (I need all A and X together) 1 A A 1 A A (1 Reply)
Discussion started by: murbina
1 Replies

9. UNIX for Dummies Questions & Answers

dead.letter

HI, I am pretty new to Unix...but here is 1 serious problem...atleast for me..:-) now..the dead.letter file in /var/tmp has been growin continuously..n i dont know why..I ve even killed the sendmail process..but the dead.letter file keeps on increasin..Can anyone tell me where do I start... (6 Replies)
Discussion started by: unisam
6 Replies
Login or Register to Ask a Question