03-10-2008
Cheap answer:
sed 's/[Ww][Oo][Rr][Kk]/job/g'
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can I do a case insensitive locate? (3 Replies)
Discussion started by: davis.ml
3 Replies
2. Shell Programming and Scripting
Is there any way to do case insensitive search with awk for the below statement:
month1=`awk '/month/' ${trgfile} | cut -d"=" -f2`
the "month" could come as Month, mOnth,MONTH etc. in a file.
Now I am looking for "month"....
Thanks,
AC (4 Replies)
Discussion started by: acheepi
4 Replies
3. Shell Programming and Scripting
can I tell awk to be case insensitive for one operation without setting the ignorecase value ?
thanks,
Steffen (7 Replies)
Discussion started by: forever_49ers
7 Replies
4. Shell Programming and Scripting
I need to remove a pattern say, ABCD whether it is in uppercase or lowercase from a string. How to do it using SED?
for example
ABCDEF should output to EF
abcdEF should also output to EF (2 Replies)
Discussion started by: vickylife
2 Replies
5. Shell Programming and Scripting
I'd like to print a line if a substring is matched in a case insensitive manner
something like do a case insensitive search for ABCD as a substring:
awk '{ if (substr($1,1,4) == "") print $1 }' infile > outfile
I'm not certain how to make the syntax work???
Thanks (4 Replies)
Discussion started by: dcfargo
4 Replies
6. Shell Programming and Scripting
Hi,
Im still new to scripting and this forum and could so with a little help
I understand:
if ; then
good
else
bad
fi
but how do I do the same check but ignore the case of <dir2>?
Many thanks!
Matt (1 Reply)
Discussion started by: mjwoodford
1 Replies
7. Shell Programming and Scripting
Hey , i am trying to do a search for the certain books , and im trying to make it case insensitive. what i have come up with so far is this :
Database.txt
RETARDED MONKEY:RACHEAL ABRAHAML:30:30:20
GOLD:FATIN:23.20:12:3
STUPID:JERLYN:20:40:3
echo -n "Title: "
read Title
echo -n... (3 Replies)
Discussion started by: gregarion
3 Replies
8. Shell Programming and Scripting
Hi,
Please help me in following prob.
I have a input file in which UPDATE statements will be present. I need to check the count of the rows impacted by each statement. I am using below code to do so:
$dml --> File having UPDATE SQLs like
Update <table_name> Set <field>=<value>... (3 Replies)
Discussion started by: ustechie
3 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
What is the command to search a file for a case-insensitive match
1.grep -nc text filename
2.grep -i text filename
3.grep -i filename text
4.grep -nc filename text
5.grep -c text filename
Thanks for your help (1 Reply)
Discussion started by: bobby1015
1 Replies
10. UNIX for Beginners Questions & Answers
Dears,
In the below string, please let me know how to make the sed search case-incensitive. I have more such lines in my script instead of let me know any other easier option.
sed -n '/dn: MSISDN=/,/^\s*$/p' full.ldif > temp ; sed -n... (4 Replies)
Discussion started by: Kamesh G
4 Replies
LEARN ABOUT PHP
natcasesort
NATCASESORT(3) 1 NATCASESORT(3)
natcasesort - Sort an array using a case insensitive "natural order" algorithm
SYNOPSIS
bool natcasesort (array &$array)
DESCRIPTION
natcasesort(3) is a case insensitive version of natsort(3).
This function implements a sort algorithm that orders alphanumeric strings in the way a human being would while maintaining key/value
associations. This is described as a "natural ordering".
PARAMETERS
o $array
- The input array.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
natcasesort(3) example
<?php
$array1 = $array2 = array('IMG0.png', 'img12.png', 'img10.png', 'img2.png', 'img1.png', 'IMG3.png');
sort($array1);
echo "Standard sorting
";
print_r($array1);
natcasesort($array2);
echo "
Natural order sorting (case-insensitive)
";
print_r($array2);
?>
The above example will output:
Standard sorting
Array
(
[0] => IMG0.png
[1] => IMG3.png
[2] => img1.png
[3] => img10.png
[4] => img12.png
[5] => img2.png
)
Natural order sorting (case-insensitive)
Array
(
[0] => IMG0.png
[4] => img1.png
[3] => img2.png
[5] => IMG3.png
[2] => img10.png
[1] => img12.png
)
For more information see: Martin Pool's Natural Order String Comparison page.
SEE ALSO
natsort(3), The comparison of array sorting functions, strnatcmp(3), strnatcasecmp(3).
PHP Documentation Group NATCASESORT(3)