---------- Post updated at 11:13 AM ---------- Previous update was at 02:36 AM ----------
Hi bakunin,
Can you help me in understanding the below 2 lines of code,
In the 1st line what is the meaning of "--" & how it gets club with $ENV.
In the 2nd line what is the meaning of sed s/#/\ /g`.
Thanks again for your time.
Last edited by Franklin52; 02-24-2014 at 08:36 AM..
Reason: Please use code tags for data and code samples
Can anyone explain me the meaning of line #2 in these lines of shell script:
if ; then
${EXPR} " ${MACTIONS
} " : ".* ${ACTION} " >/dev/null 2>&1 || die "$USAGE"
else
Sorry in case this is a trivial thing (I am not an expert in this). (3 Replies)
Hello all,
I want to be able to create a script on the fly from another script by echoing lines into a file, but am running into difficulty, as it isn't working right. What am I doing wrong?
echo "for i in `grep $FRAME /root_home/powermt.sort.fil |awk '{print $7}'`" > pvtimout_set.sh... (5 Replies)
hello every one i want to know meaning of following line
INST_PARA=$HOME/install/Install.Para
SAVEMEDIUM=`awk '$2=="ArchiveSave"{print$4}' $INST_PARA` (4 Replies)
This may be little confusing. I have Script1, which pulls data from the system and creates another script(lets say script2). While I run script1 I need to add printf/echo statements for script2, so that when I run script2 I see those statement.
eg: script1 765
printf " display frame-$1 timeoffset... (2 Replies)
Hi,
I would like to ask about the meaning or purpose of set -e in the script bash, Does it mean if a wrong command in the script it will close or exit the script without continuation thats what happen if i set it in the terminal.
Thanks in advance (3 Replies)
What would the below code snippet mean?
my ($_configParam, $_paramValue) = split(/\s*=\s*/, $_, 2);
$configParamHash{$_configParam} = $_paramValue; (2 Replies)
Hi All,
I am new to unix shell scripting and I was documenting one of the unix script and encountered below statements -
for ii in `ls -1rt /oracle/admin/MARSCOPY/ext_files/fpm-ifpm/*.small.txt | tail -1 | awk '{print $1}'`
do
smallssim=${ii##/oracle/admin/MARSCOPY/ext_files/fpm-ifpm/}... (2 Replies)
Please let me understand the meaning of following line in unix bash scripting .is =~ means not equal to or equal to .
if ]; then
echo -e "pmcmd startworkflow -sv ${INTSERV} -d ${INFA_DEFAULT_DOMAIN} -uv INFA_DEFAULT_DOMAIN_USER" \
"-pv INFA_DEFAULT_DOMAIN_PASSWORD -usdv... (2 Replies)
Discussion started by: harry00514
2 Replies
LEARN ABOUT PHP
microtime
MICROTIME(3) 1 MICROTIME(3)microtime - Return current Unix timestamp with microsecondsSYNOPSIS
mixed microtime ([bool $get_as_float = false])
DESCRIPTION microtime(3) returns the current Unix timestamp with microseconds. This function is only available on operating systems that support the
gettimeofday() system call.
PARAMETERS
o $get_as_float
- If used and set to TRUE, microtime(3) will return a float instead of a string, as described in the return values section below.
RETURN VALUES
By default, microtime(3) returns a string in the form "msec sec", where sec is the number of seconds since the Unix epoch (0:00:00 January
1,1970 GMT), and msec measures microseconds that have elapsed since sec and is also expressed in seconds.
If $get_as_float is set to TRUE, then microtime(3) returns a float, which represents the current time in seconds since the Unix epoch
accurate to the nearest microsecond.
EXAMPLES
Example #1
Timing script execution with microtime(3)
<?php
/**
* Simple function to replicate PHP 5 behaviour
*/
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
// Sleep for a while
usleep(100);
$time_end = microtime_float();
$time = $time_end - $time_start;
echo "Did nothing in $time seconds
";
?>
Example #2
Timing script execution in PHP 5
<?php
$time_start = microtime(true);
// Sleep for a while
usleep(100);
$time_end = microtime(true);
$time = $time_end - $time_start;
echo "Did nothing in $time seconds
";
?>
Example #3
microtime(3) and REQUEST_TIME_FLOAT (as of PHP 5.4.0)
<?php
// Randomize sleeping time
usleep(mt_rand(100, 10000));
// As of PHP 5.4.0, REQUEST_TIME_FLOAT is available in the $_SERVER superglobal array.
// It contains the timestamp of the start of the request with microsecond precision.
$time = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"];
echo "Did nothing in $time seconds
";
?>
SEE ALSO time(3).
PHP Documentation Group MICROTIME(3)