Find text in the current folder and redirect output to OP1.txt find . -name "*" -exec grep "FIND THIS TEXT" {} \;>> OP1.txt Find text in the current folder and print the output on screen grep "FIND THIS TEXT" `find .` |cut -d":" -f1 | grep -v properties | sort -u find the text and print the file name along with the path on screen find xxxxxPATH_TO_SEARCHxxxxxx -type f -exec grep -l 'FIND THIS TEXT' {} \;
Query to update a column of a table with random values within a range of 1 to 21 UPDATE <%table_name%> SET <%column_name%> = trunc(dbms_random.value(2,21))
declare cursor c1 is select column_name , table_name from user_tab_columns where data_type = 'VARCHAR2' ; -- and table_name = 'TABLE_NAME' ; vSQL varchar2 ( 32676 ) := null ; vParam varchar2 ( 100 ) := 'STING_YOU_WANT_TO_SEARCH' ; vcnt number ; begin for x in c1 loop begin vSQL := 'select count(*) from ' ||x.table_name|| ' where ' ||x.column_name|| ' like ' ||chr( 39 )|| '%' ||vparam|| '%' ||chr( 39 ); execute immediate vSQL into vcnt; if vcnt > 0 then dbms_output.put_line( 'Found in ' ||x.table_name|| ' ' ||x.column_name); end if ; exception when others then dbms_output.put_line( 'Problem in ' ||vSQL); end ; end loop ; end ;