Sponsored Content
Top Forums Shell Programming and Scripting If echo statement return false Post 302956259 by MadeInGermany on Monday 28th of September 2015 11:59:59 AM
Old 09-28-2015
@sea, ITYM
Code:
TotProcMin=$((${TotProcMin/:*}+${procdays}*1440))

Some optimizations (less calls to external programs); should work in most shells:
Code:
ScriptElapsedTime=`ps -p $$ -o etime= | awk '{print $1}'`

if [[ "$ScriptElapsedTime" = *-* ]]
then
  mailout.sh NAME "$oradb - ScriptElapsedTime debug" "ScriptElapsedTime='$ScriptElapsedTime'"
  procdays=${ScriptElapsedTime%-*}
  proctime=${ScriptElapsedTime##*-}
  procminutes=${proctime%:*}
  TotProcMin=$(( $procminutes+$procdays*1440 ))
fi

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

echo statement

Does anyone know the correct syntax for computing arithmetic expressions inside the echo statement? Let me know, thanks (3 Replies)
Discussion started by: circleW
3 Replies

2. Shell Programming and Scripting

Insert TAB in echo statement

Hi, Can some1 help me to output a tab in an echo statement. I have tried echo "RNC: \t NODEB" but dont get the correct output. I am a beginnger to unix, so pls hold back the laughs....if u can (5 Replies)
Discussion started by: sunils27
5 Replies

3. Shell Programming and Scripting

echo statement issue

Hi All, I am pasting my code below if # e means file exists then echo OFR_Configlist exists >> OFR_Backup_Configfiles.log else echo OFR_Configlist Not exists >> OFR_Backup_Configfiles.log exit fi How can i show the echo message in console also at the same time? I dont want to write... (3 Replies)
Discussion started by: subin_bala
3 Replies

4. Shell Programming and Scripting

setting width in echo statement

Hello All, I need to set the width or number of columns for my dynamic output in the echo statement. statement is like: echo " <output> " here the <output> is dyamice and can be of any number of characters, the " " should always start in same column everytime it is... (4 Replies)
Discussion started by: s123.radha
4 Replies

5. UNIX for Advanced & Expert Users

Return the last echo in remsh !!!!

Hi, I have a question: the script A run in the HostA call the script B on the HostB: ex.. ksh:B ....... ........ ........ remsh HostB ec........ ...... ...... the prog.B on the host B make more function but the last command is echo of srting : ex ksk script B .... ...... (0 Replies)
Discussion started by: ZINGARO
0 Replies

6. Shell Programming and Scripting

Output of both the echo statement in one line

I have script like echo -n FINISHED FEXP: ${TABLE2EXP} echo $STATUS I want the output of both the echo statement in one line How can i do this (3 Replies)
Discussion started by: scorp_rahul23
3 Replies

7. Shell Programming and Scripting

echo 2 txt files to screen no carraige return

I have two text files, each of then only containing ONE line and NO carraige return or white space at the end...how do I echo both of these text files to the screen without putting an extra line? I want to do this from the command line. file1.txt: this is file1.txt 1 file2.txt: this is... (4 Replies)
Discussion started by: ajp7701
4 Replies

8. Shell Programming and Scripting

Return vs. Echo

In a Ksh functions, when you have both echo and return respectively - what does it do. E.g. Func B () { ..... { ..... echo $Varaible } Return 0 } Func A () { $Var1 = Func B() .... .... } (6 Replies)
Discussion started by: gagan8877
6 Replies

9. Shell Programming and Scripting

how to read a file to an echo statement

I was searching for an option where i can echo some strings together with the contents of a file. Eg. I was to echo the below string to a file "alter application PMS_ add variable CurrYear Y2009;" >> ${ESS_MAXL_DIR}/PMS_SUB.txt The value 2009 is coming from a file called date.txt without the... (3 Replies)
Discussion started by: Celvin VK
3 Replies

10. AIX

Return code 1 when echo to pipe

Hello, Our AIX box has recently been upgraded to TL12 (oslevel -s = 5300-12-04-1119). Now one of our ksh scripts is returning 1 when writing to a pipe, the command to write to the pipe is: echo "A" "B" "C" >> /usr/Pipe.Pipe Anyone have any ideas? Thanks (2 Replies)
Discussion started by: dendright
2 Replies
HARUPAGE(3)								 1							       HARUPAGE(3)

The HaruPage class

INTRODUCTION
Haru PDF Page Class. CLASS SYNOPSIS
HaruPage HaruPage Methods o bool HaruPage::arc (float $x, float $y, float $ray, float $ang1, float $ang2) o bool HaruPage::beginText (void ) o bool HaruPage::circle (float $x, float $y, float $ray) o bool HaruPage::closePath (void ) o bool HaruPage::concat (float $a, float $b, float $c, float $d, float $x, float $y) o object HaruPage::createDestination (void ) o object HaruPage::createLinkAnnotation (array $rectangle, object $destination) o object HaruPage::createTextAnnotation (array $rectangle, string $text, [object $encoder]) o object HaruPage::createURLAnnotation (array $rectangle, string $url) o bool HaruPage::curveTo2 (float $x2, float $y2, float $x3, float $y3) o bool HaruPage::curveTo3 (float $x1, float $y1, float $x3, float $y3) o bool HaruPage::curveTo (float $x1, float $y1, float $x2, float $y2, float $x3, float $y3) o bool HaruPage::drawImage (object $image, float $x, float $y, float $width, float $height) o bool HaruPage::ellipse (float $x, float $y, float $xray, float $yray) o bool HaruPage::endPath (void ) o bool HaruPage::endText (void ) o bool HaruPage::eofill (void ) o bool HaruPage::eoFillStroke ([bool $close_path = false]) o bool HaruPage::fill (void ) o bool HaruPage::fillStroke ([bool $close_path = false]) o float HaruPage::getCharSpace (void ) o array HaruPage::getCMYKFill (void ) o array HaruPage::getCMYKStroke (void ) o object HaruPage::getCurrentFont (void ) o float HaruPage::getCurrentFontSize (void ) o array HaruPage::getCurrentPos (void ) o array HaruPage::getCurrentTextPos (void ) o array HaruPage::getDash (void ) o int HaruPage::getFillingColorSpace (void ) o float HaruPage::getFlatness (void ) o int HaruPage::getGMode (void ) o float HaruPage::getGrayFill (void ) o float HaruPage::getGrayStroke (void ) o float HaruPage::getHeight (void ) o float HaruPage::getHorizontalScaling (void ) o int HaruPage::getLineCap (void ) o int HaruPage::getLineJoin (void ) o float HaruPage::getLineWidth (void ) o float HaruPage::getMiterLimit (void ) o array HaruPage::getRGBFill (void ) o array HaruPage::getRGBStroke (void ) o int HaruPage::getStrokingColorSpace (void ) o float HaruPage::getTextLeading (void ) o array HaruPage::getTextMatrix (void ) o int HaruPage::getTextRenderingMode (void ) o float HaruPage::getTextRise (void ) o float HaruPage::getTextWidth (string $text) o array HaruPage::getTransMatrix (void ) o float HaruPage::getWidth (void ) o float HaruPage::getWordSpace (void ) o bool HaruPage::lineTo (float $x, float $y) o int HaruPage::measureText (string $text, float $width, [bool $wordwrap = false]) o bool HaruPage::moveTextPos (float $x, float $y, [bool $set_leading = false]) o bool HaruPage::moveTo (float $x, float $y) o bool HaruPage::moveToNextLine (void ) o bool HaruPage::rectangle (float $x, float $y, float $width, float $height) o bool HaruPage::setCharSpace (float $char_space) o bool HaruPage::setCMYKFill (float $c, float $m, float $y, float $k) o bool HaruPage::setCMYKStroke (float $c, float $m, float $y, float $k) o bool HaruPage::setDash (array $pattern, int $phase) o bool HaruPage::setFlatness (float $flatness) o bool HaruPage::setFontAndSize (object $font, float $size) o bool HaruPage::setGrayFill (float $value) o bool HaruPage::setGrayStroke (float $value) o bool HaruPage::setHeight (float $height) o bool HaruPage::setHorizontalScaling (float $scaling) o bool HaruPage::setLineCap (int $cap) o bool HaruPage::setLineJoin (int $join) o bool HaruPage::setLineWidth (float $width) o bool HaruPage::setMiterLimit (float $limit) o bool HaruPage::setRGBFill (float $r, float $g, float $b) o bool HaruPage::setRGBStroke (float $r, float $g, float $b) o bool HaruPage::setRotate (int $angle) o bool HaruPage::setSize (int $size, int $direction) o bool HaruPage::setSlideShow (int $type, float $disp_time, float $trans_time) o bool HaruPage::setTextLeading (float $text_leading) o bool HaruPage::setTextMatrix (float $a, float $b, float $c, float $d, float $x, float $y) o bool HaruPage::setTextRenderingMode (int $mode) o bool HaruPage::setTextRise (float $rise) o bool HaruPage::setWidth (float $width) o bool HaruPage::setWordSpace (float $word_space) o bool HaruPage::showText (string $text) o bool HaruPage::showTextNextLine (string $text, [float $word_space], [float $char_space]) o bool HaruPage::stroke ([bool $close_path = false]) o bool HaruPage::textOut (float $x, float $y, string $text) o bool HaruPage::textRect (float $left, float $top, float $right, float $bottom, string $text, [int $align = HaruPage::TALIGN_LEFT]) PREDEFINED CONSTANTS
PHP Documentation Group HARUPAGE(3)
All times are GMT -4. The time now is 11:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy