################################################################################# # this program will search the string in that # # are present in the whole directory structure. # # Pass command line arguments as follows---- # # perl removestring.pl path Searchstring # ################################################################################# #!/usr/bin/perl use strict; use File::Find; use warnings; my $oldstring; my $newstring; my $path; my $i=0; sub checkArgs() { print $#ARGV+1; die "invalid no of arguments [path oldstring new string]!!" if $#ARGV+1 !=2 ; for ( @ARGV ) { s/\\n/\n/g; } $oldstring="$ARGV[1]"; print "<<$oldstring>>\n"; $path=$ARGV[0]; print "path: $path ,string:$oldstring(y/n):"; my $ok=; chomp($ok); die "please run the program again with correct arguments:!!" if $ok ne "y"; find(\&wanted,$path); print "\n\nString Found in $i Files"; } sub wanted { my $flag=0; $flag=1 if !-d && $File::Find::name =~ /.bteq$/; if($flag==1){ my $string=""; open FH1, "< $File::Find::name" or die "Couldn't open file: "; while (){ $string .= $_; } if($string=~ m/\Q$oldstring\E/){ print "\nstring found in ...\n$File::Find::name"; $i++; } } } checkArgs(); #### SELECT JSON_col FROM stud_info_small ORDER BY JSON_col.stu_id; SELECT JSON_col FROM stud_info_small WHERE JSON_col.stu_id = "stu_10" ORDER BY JSON_col.stu_id; SELECT JSON_col FROM stud_info_small WHERE JSON_col.qualifications = "Associate Degree" ORDER BY JSON_col.stu_id; ORDER BY stud_doc.stud_id; ORDER BY stud_doc.stud_id;