07-13-2006
Ignore case sensitive in Case Switch
In a Case switch, how to ignore case sensitive in the test:
e.g.
case "$field" in
"TEST) action1;;
*) action2;;
esac
How to go in action1 in case of $field = TEST , or Test , or test or .... without enumerating all possibilities...
Thanks, Annick.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
It has been quite a while since I used UNIX. I am developing
a security system and I was wondering if UNIX and/or LINUX
user ID's are case-sensitive.
i.e. can user 'daveb' and 'Daveb' exist on the same system with
completely different authorizations/priorities, etc.? (3 Replies)
Discussion started by: dmilleville
3 Replies
2. UNIX for Dummies Questions & Answers
Hello users,
I have a question ?
I was just wondering whether the hostname on unix systems are case sensitive.
For example in the system which I work.
ping TestHost and ping testhost gives me the same output i.e I get the reply from the remote host
Is this applicable for all... (3 Replies)
Discussion started by: ajphaj
3 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
Im newbie, can i disable case sensitive on RHEL environment, and how?
Thank you. (2 Replies)
Discussion started by: blesets
2 Replies
4. Solaris
I was instructed by my superior to change kernel parameter, adding up this parameter to /etc/system. Server is Solaris 10 on SPARC.
Tcp_conn_req_max_q 1024In my Google search, all I know that the sentence is in small case (tcp_conn_req_max_q) but as you can see above, instruction given... (4 Replies)
Discussion started by: Olli.Lang
4 Replies
5. UNIX for Dummies Questions & Answers
Is there a way for me to take a parameter then store it in a variable and use its value as non case sensitive?
Ex.
Lets say i have a parameter which contains "Hey".
Then im gonna store it to GR using GR=$1.
CL=/install/$GR.g
How can i make GR non case sensitive so that the... (1 Reply)
Discussion started by: khestoi
1 Replies
6. UNIX for Advanced & Expert Users
Can someone please tell me why iname is being case sensitive with this?
$ find /media -iname *load* 2>/dev/null
/media/Part 2/stuff/Downloads
/media/Part 1/Application Data/Mozilla/Firefox/Profiles/wnul4kj4.irc/chatzilla/downloads
/media/Part 1/Bob_5-22-2010/Application... (5 Replies)
Discussion started by: cokedude
5 Replies
7. Shell Programming and Scripting
Hello all,
This is my first thread so please let me know if I am doing anything wrong or not following etiquette.
I have an input file that looks like
123a12345
345a12445
245a66792
245A12345
215A23566
and I want output files that look like
a.txt
123a12345
345a12445
245a66792
... (7 Replies)
Discussion started by: monstrousturtle
7 Replies
8. Shell Programming and Scripting
Hi All,
select app from the menu:
ABC
DEF
GHI
JKL
ALL # ALL will select all the apps in the menu
echo "Enter your option"
read option;
if
then
<execute the below command>
elif # option is the 1 selection from menu...not ALL
<execute the below command>
else (14 Replies)
Discussion started by: Devaraj A
14 Replies
9. Shell Programming and Scripting
Hi, users file contains below names i have a requirement to keep only one case sensitive user. For e.g if user name is "aaa" then only aaa should be there in the file and other matching users(AAA,aaA) should be deleted.
Tried multiple options but no luck can you please help.
aaa
abc
AAA... (2 Replies)
Discussion started by: Satyak
2 Replies
10. Shell Programming and Scripting
Hello All,
Please help me with this
I need to create a cronjob that should delete all files which are older than 30days with '*.txt' and should not delete files with '*TEST*.txt' either file name TEST is upper or test lower case sensitive
here's the script
/DIR -type f -name '*.txt'... (7 Replies)
Discussion started by: krish_007
7 Replies
LEARN ABOUT FREEBSD
atf-test-program
ATF-TEST-PROGRAM(1) BSD General Commands Manual ATF-TEST-PROGRAM(1)
NAME
atf-test-program -- common interface to ATF test programs
SYNOPSIS
atf-test-program [-r resfile] [-s srcdir] [-v var1=value1 [.. -v varN=valueN]] test_case
atf-test-program -l
DESCRIPTION
Test programs written using the ATF libraries all share a common user interface, which is what this manual page describes. NOTE: There is no
binary known as atf-test-program; what is described in this manual page is the command-line interface exposed by the atf-c, atf-c++ and
atf-sh bindings.
In the first synopsis form, the test program will execute the provided test case and print its results to the standard output, unless other-
wise stated by the -r flag. Optionally, the test case name can be suffixed by ':cleanup', in which case the cleanup routine of the test case
will be executed instead of the test case body; see atf-test-case(4). Note that the test case is executed without isolation, so it can and
probably will create and modify files in the current directory. To execute test cases in a controller manner, you need a runtime engine that
understands the ATF interface. The recommended runtime engine is kyua(1). You should only execute test cases by hand for debugging pur-
poses.
In the second synopsis form, the test program will list all available test cases alongside their meta-data properties in a format that is
machine parseable. This list is processed by kyua(1) to know how to execute the test cases of a given test program.
The following options are available:
-l Lists available test cases alongside a brief description for each of them.
-r resfile Specifies the file that will receive the test case result. If not specified, the test case prints its results to stdout. If
the result of a test case needs to be parsed by another program, you must use this option to redirect the result to a file
and then read the resulting file from the other program. Note: do not try to process the stdout of the test case because
your program may break in the future.
-s srcdir The path to the directory where the test program is located. This is needed in all cases, except when the test program is
being executed from the current directory. The test program will use this path to locate any helper data files or utilities.
-v var=value Sets the configuration variable var to the value value.
SEE ALSO
kyua(1)
BSD
March 2, 2014 BSD