===========================================================
                                      .___ __  __   
          _________________  __ __  __| _/|__|/  |_ 
         / ___\_` __ \__  \ |  |  \/ __ | | \\_  __\
        / /_/  >  | \// __ \|  |  / /_/ | |  ||  |  
        \___  /|__|  (____  /____/\____ | |__||__|  
       /_____/            \/           \/           
              grep rough audit - static analysis tool
                  v2.8 written by @Wireghoul
=================================[justanotherhacker.com]===
beancounter-0.8.10/flip_symbol.sh-11-do
beancounter-0.8.10/flip_symbol.sh:12:    echo "update $table set symbol='$2' where symbol='$1';" | \
beancounter-0.8.10/flip_symbol.sh-13-	psql -e -d beancounter 
##############################################
beancounter-0.8.10/contrib/getDiv-61-            #print "$ratio at $lastDate\n";
beancounter-0.8.10/contrib/getDiv:62:            $sql = "UPDATE stockprices SET day_open = day_open * $ratio, day_low = day_low * $ratio, day_high = day_high * $ratio, day_close = day_close * $ratio, volume = volume * $ratio WHERE symbol = '$symbol' AND date < '$lastDate';\n";
beancounter-0.8.10/contrib/getDiv-63-            print $sql;
##############################################
beancounter-0.8.10/BeanCounter.pm-1373-	$cmd .= "day_close = $data{day_close} "   .
beancounter-0.8.10/BeanCounter.pm:1374:	        "where currency = '$data{symbol}' " .
beancounter-0.8.10/BeanCounter.pm-1375-		"and date     = '$data{date}'";
##############################################
beancounter-0.8.10/BeanCounter.pm-1415-	$cmd .= "day_close = " . 1.0/$lref->[$i] . " "  .
beancounter-0.8.10/BeanCounter.pm:1416:   	    "where currency = '$fx' and date  = '$data{date}'";
beancounter-0.8.10/BeanCounter.pm-1417-      } else {
##############################################
beancounter-0.8.10/BeanCounter.pm-1446-	$cmd .= "day_close = " . $q[1] . " "  .
beancounter-0.8.10/BeanCounter.pm:1447:   	    "where currency = '$fx' and date  = '$data{date}'";
beancounter-0.8.10/BeanCounter.pm-1448-      } else {
##############################################
beancounter-0.8.10/BeanCounter.pm-1936-	      "avg_volume = $hash{$key}{average_volume} " .
beancounter-0.8.10/BeanCounter.pm:1937:	      "where symbol = '$hash{$key}{symbol}';";
beancounter-0.8.10/BeanCounter.pm-1938-    $cmd =~ s|'?N/A'?|null|g;	# convert (textual) "N/A" into (database) null 
##############################################
beancounter-0.8.10/beancounter-550-	if defined($dr->[$i][8]);
beancounter-0.8.10/beancounter:551:      $cmd.= "where symbol     = '$arg' ";
beancounter-0.8.10/beancounter-552-      $cmd.= "and date         = '$dr->[$i][0]'";
##############################################
beancounter-0.8.10/beancounter-580-	if defined($dr->[$i][1]);
beancounter-0.8.10/beancounter:581:      $cmd.= "where symbol  = '$arg' ";
beancounter-0.8.10/beancounter-582-      $cmd.= "and   shares  = '$dr->[$i][0]' ";
##############################################
beancounter-0.8.10/beancounter-603-  } elsif ($fxarg) {
beancounter-0.8.10/beancounter:604:    $stmt = $stmt . qq{where currency='$fxarg' };
beancounter-0.8.10/beancounter-605-  } elsif ($datearg ne "today") {
beancounter-0.8.10/beancounter:606:    $stmt = $stmt . qq{where date='$datearg' };
beancounter-0.8.10/beancounter-607-  } else {			# need a default clause
##############################################
beancounter-0.8.10/beancounter-1115-    foreach my $table (qw/ stockinfo stockprices indices portfolio/) {
beancounter-0.8.10/beancounter:1116:      my $cmd = "delete from $table where symbol = '$arg';";
beancounter-0.8.10/beancounter-1117-      print "$cmd\n" if $Config{verbose};
##############################################
beancounter-0.8.10/beancounter-1127-  if (lc $Config{dbsystem} eq "mysql") {
beancounter-0.8.10/beancounter:1128:    system("mysqladmin drop $Config{dbname}")
beancounter-0.8.10/beancounter-1129-      or warn("Could not delete MySQL database $Config{dbname}");
##############################################
beancounter-0.8.10/beancounter-1132-    #  system("psql -q -c \"drop database beancounter\"") == 0 
beancounter-0.8.10/beancounter:1133:    system("dropdb $Config{dbname}")	# requires PostgreSQL >= 7.1
beancounter-0.8.10/beancounter-1134-      or warn("Could not delete Postgresql database $Config{dbname}");
##############################################
beancounter-0.8.10/setup_beancounter-362-    if [ "$DBSYSTEM" = "MySQL" ]; then
beancounter-0.8.10/setup_beancounter:363:	result=`echo 'show databases'| $DBCOMMAND | grep $DATABASE`
beancounter-0.8.10/setup_beancounter-364-    elif [ "$DBSYSTEM" = "PostgreSQL" ]; then
beancounter-0.8.10/setup_beancounter:365:	result=`$DBCOMMAND template1 -l | grep $DATABASE`
beancounter-0.8.10/setup_beancounter-366-    elif [ "$DBSYSTEM" = "SQLite" ] || [ "$DBSYSTEM" = "SQLite3" ]; then
beancounter-0.8.10/setup_beancounter:367:	result=`test -f $DATABASE && ls -1 $DATABASE`
beancounter-0.8.10/setup_beancounter-368-    fi