Hi All,
I have an expression as follows:-
a=`expr ${i} + ${j}` >> $log_file 2>&1
Here, if any of the values i or j or both happens to be empty then the "expr" returns error as
"expr: 0402-050 Syntax error." My problem is I am not able to re-direct this error to the log file. Its is getting... (4 Replies)
Hi,
I have a script to compare 2 files.
file1=$1
file2=$2
num_of_records_file1=`awk ' END { print NR } ' $file1`
num_of_records_file2=`awk ' END { print NR } ' $file2`
i=1
while
do
sed -n "$i"p $file1 > file1_temp
sed -n "$i"p $file2 > file2_temp
diff file1_temp... (5 Replies)
Hi there,
We have 2 apps on our customers machines that can both open files with the same file extension. Is there any way via shell commands to set which application should be the default?
Essentially, I'm hoping to replicate Get Info > Open With > Change All using a shell script, but I just... (0 Replies)
Hello, currently we are executing a .sh from terminal.
The current .sh looks like this:
#!/usr/bin/env bash
/Users/user/my.app/Contents/MacOS/my &
--
Now, we also need to run a third line in the .sh - It's a command line application that I need to run when I execute the above .sh... (0 Replies)
#!/bin/ksh -x
cd /tmp/tj
ftp -n servername.com << DONE
user username password
as
put test.log
quit
close
DONE
echo "testing..."
sh -x scriptname, and it shows all, but username, as, put, quit, close, DONE.
how can i see those ? (1 Reply)
Hi guys,
been scratching round the forums and my mountain of resources.
Maybe I havn't read deep enough
My question is not how sed edits a stream and outputs it to a file, rather something like this below:
I have a .txt with some text in it :rolleyes:
abc:123:xyz
123:abc:987... (7 Replies)
What is the best practice to allow a 3rd party health monitoring app to read the messages file. Since messages is a system file and is owned by root the app cannot read the file. I don't want to run the app as root so how should I allow the app to read the file. The read function is actually built... (2 Replies)
Discussion started by: slwiley
2 Replies
LEARN ABOUT DEBIAN
data::objectdriver::profiler
Data::ObjectDriver::Profiler(3pm) User Contributed Perl Documentation Data::ObjectDriver::Profiler(3pm)NAME
Data::ObjectDriver::Profiler - Query profiling
SYNOPSIS
my $profiler = Data::ObjectDriver->profiler;
my $stats = $profiler->statistics;
my $total = $stats->{'DBI:total_queries'};
my $log = $profiler->query_log;
$profiler->reset;
USAGE
$Data::ObjectDriver::PROFILE
To turn on profiling, set $Data::ObjectDriver::PROFILE to a true value. Alternatively, you can set the DOD_PROFILE environment variable to
a true value before starting your application.
Data::ObjectDriver->profiler
Profiling is global to Data::ObjectDriver, so the Profiler object is a global instance variable. To get it, call
Data::ObjectDriver->profiler, which returns a Data::ObjectDriver::Profiler object.
$profiler->statistics
Returns a hash reference of statistics about the queries that have been executed.
$profiler->query_log
Returns a reference to an array of SQL queries as they were handed off to DBI. This means that placeholder variables are not substituted,
so you'll end up with queries in the query log like "SELECT title, difficulty FROM recipe WHERE recipe_id = ?".
$profiler->query_frequency
Returns a reference to a hash containing, as keys, all of the SQL statements in the query log, where the value for each of the keys is a
number representing the number of times the query was executed.
$profiler->reset
Resets the statistics and the query log.
$profiler->total_queries
Returns the total number of queries currently logged in the profiler.
$profiler->report_queries_by_type
Returns a string containing a pretty report of information about the current number of each type of query in the profiler (e.g. "SELECT",
"INSERT").
$profiler->report_query_frequency
Returns a string containing a pretty report of information about the current query frequency information in the profiler.
perl v5.12.4 2011-08-29 Data::ObjectDriver::Profiler(3pm)