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> where <field>=<value>
$temp1 --> Temporary file having only WHERE clause of the SQLs present in $dml
$ddl --> Having SELECT COUNT(*) statements using the WHERE clause present in $temp1 ISSUE: If the SQL in the input file ($dml) have WHERE or Where instead of where then this code does not work.
So I need to make it case insensitive....
I can make "cnt=`cat $dml | grep -c "where" | tr -s " "` " case insensitive by adding -i in grep: cnt=`cat $dml | grep -c -i "where" | tr -s " "` .
Please suggest me if this is wrong and I need to make the rest of the 2 commands case insensitive...
sed 's/.*\(where .*$\)/\1/' $dml > $temp1
sed "s/where/select count(*) from $SCH.$TBL where/" $temp1 > $ddl
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)
I am trying to find case insensitive file names and then replace that particular file with other name.
if
then
ls | grep -i "update" | xargs -I {} mv {} LineItems.csv
echo "File moved from *update*"
elif
then
ls | grep -i "priority" | xargs -I {} mv {} ... (1 Reply)
here is a statement
awk '/CREATE PROCEDURE/,/elimiter/' "$file1" > onlyproc1.sql
which mean cut from create procedure to Delimiter or delimiter and paste it in onlyproc1.sql... my query is how to make this case insensitive.. that is i want the above code to work whther it is Delimiter or... (26 Replies)
Hello,
How do I set case insensitive search mode while the file is open with more command ?
(I know -i option which could be used before opening)
thanks
Vilius (2 Replies)
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)
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)
hi everyone,
I need to do the following thing in a case insesitive mode
sed 's/work/job/g' filename
since work could appear in different form as Work WORK WorK wORK,....
I was wondering if i could do a case insensitive search of a word.
thanks in advance,
:) (4 Replies)