Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extract Data and Average Backup Time and Speed 2

Status
Not open for further replies.

tbenn

IS-IT--Management
Nov 22, 2004
9
US
I have an Input file – InFileA containing some info:

FIRST NOTE: There are many more lines to this file than printed below, but they are mostly between the “0 and 100” under the “% Complete” column. :

SECOND NOTE: the notification Backing up / filesystem .. occurs throughout the 0 and 100 “% Complete” column – For Example, Backing up afdata01 .. which is a logical volume – this is repeated for EACH logical volume in the volume group being backed up.

THIRD NOTE: The “Estimated size is …” info actually may change during the course of the backup – it changed here from a statement of “Estimated size is 141772 MB” but in the end, it turned out to be 141819 of 141819. this info may not be pertinent however as long as we can average the total minutes in the backup.

FOURTH NOTE: There is also one other notification within the contents of this InFileA – telling us to change Volume 2, Volume 3, Volume 4, etc. tapes Again, this info may not be pertinent however as long as we can average the total minutes in the backup. It looks like this:
******************************************************
* Device rmt1 reached end of media during backup of *
* "audata07". *
* --------------------------- *
* Please insert volume 2. Backup will continue *
* automatically when new tape has been inserted. *
******************************************************
The backup then continues and is logged into InFileA as shown below:

BEGINNING of FILE:

Changing tape block size to 512 ..
Placing boot image on tape ..
bosboot: Boot image is 14437 512 byte blocks.
Placing install image on tape ..
Placing Sysback programs on tape ..
Returning tape block size to 131072 ..
Repositioning tape ..

Generating LVM information ..
Generating table of contents ..
Pre-processing / filesystem ..
Pre-processing afdata01 logical volume ..
Pre-processing afdata15 logical volume ..
Writing table of contents ..
Backing up System:
Volume Groups "rootvg prodvg1"
Start date is Wed Nov 17 10:37:25 2004
User is xxxx at system1
Estimated size is 141772 MB

Backing up / filesystem ..

ESTIMATED PROGRESS
-----------+-------------------+----------------+---------
% Complete | Elapsed Time | Megabytes |Kbytes/Sec
-----------+-------------------+----------------+---------
0 | 0 minutes of 1050 | 1 of 141772 | 4095
Backing up afdata01 ..
0 | 0 minutes of 1040 | 10 of 141772 | 4096
0 | 0 minutes of 1000 |100 of 141772 | 4195
1 | 3 minutes of 950 |1000 of 141772 | 4295
Backing up audata07 ..
5 | 25 minutes of 900 |10000 of 141772 | 4395

******************************************************
* Device rmt1 reached end of media during backup of *
* "audata07". *
* --------------------------- *
* Please insert volume 2. Backup will continue *
* automatically when new tape has been inserted. *
******************************************************
90 | 400 minutes of 444 | 141800 of 141819 | 5441
100 | 444 minutes of 444 | 141819 of 141819 | 5442

Backup ended Wed Nov 17 18:42:20 2004
141819 megabytes written to 3 volumes.

SUCCESS: System backup completed successfully.
Changing tape block size from 131072 back to 1024

END of FILE:

I want to extract ONLY the lines with 0 to 100 “% Complete” to do the “averaging” of only 2 fields – the “ xx minutes “ and the “Kbytes/Sec numerical values” but print the following info as well:

• The Estimated size is 141772 MB
• The Actual size was xxxxxx MB - this would be the 141819 value.
• Running Time Calculations
• Average # of minutes: 300.7 – this is the average of the “ xx minutes “

• Running Speed Calculations
• Average tape speed: 5442.3 – this is the average of the “Kbytes/Sec numerical values”

I believe I successfully average the “xx minutes” field, but fail when trying the same operation with the
“Kbytes/Sec” field. But I'm not extracting the pertinent data to another file, so it could be wrong all the way.

Note: If it matters, the file InFileA, is created by Sysback Ver. 5.1 on AIX 5.1.

Any help?
 
Code:
BEGIN { FS=" *[|] *" }

/Estimated size is / { split( $0, a, / is +/ )
  estimate = a[2]
  next
}

/ megabytes written to / {
  actual = 0 + $0; next }

0==$1, 100==$1 {
  if ( 4==NF )
  { count++
    minutes += $2
    rate += $4
  }
}

END {
  print "Estimated size:", estimate
  print "Actual size:   ", actual, "MB"

  print "Average of minutes:", minutes/count
  print "Average Kbytes/sec:", rate/count
}
Does this do what you want?

 
Almost! When I save your script to "CalcTimeSpeed" and redirect output to "BackUpCalc", it actually prints out the entire log file - which is a duplicate of what I already have and I do not need that. It then tags the calcs on to the bottom of the file. It does NOT calculate the "Average of minutes" or even print out the "Average Kbytes/sec:" or the calculation of its value as you can see.

Command run: awk -f CalcTimeSpeed BackUpCalc

In Addition to the entire "log" file contents (which I don't want), this is what prints out for Calculations:
Estimated size: 131072 MB
Actual size: 131112 MB
Average of minutes:

I only want this info in the "BackUpCalc" file:
Estimated size: 131072 MB
Actual size: 131112 MB
Average of minutes: With Caluclated Value
Average Kbytes/sec: With Caluclated Value

Thanks for your time.
 
As a test, I copied and pasted the above code and ran it with your data (not under Unix, but in a DOS box under Windows).

Result of awk95 -f dup.awk data:
[tt]
Estimated size: 141772 MB
Actual size: 141819 MB
Average of minutes: 124.571
Average Kbytes/sec: 4565.57
[/tt]
Result of mawk -f dup.awk data:
[tt]
Estimated size: 141772 MB
Actual size: 141819 MB
Average of minutes: 124.571
Average Kbytes/sec: 4565.57
[/tt]
Result of gawk -f dup.awk data:
[tt]
Estimated size: 141772 MB
Actual size: 141819 MB
Average of minutes: 124.571
Average Kbytes/sec: 4565.57
[/tt]
If you have nawk, try using it. And, of course, don't try to type what I posted; to avoid errors and save time, copy and paste.


 
It's still not working - of course I copy and pasted your program to "CalcTimeSpeed" as opposed to writing it. I downloaded gawk ver 3.1.4 and get the following:

Command run: gawk -f CalcTimeSpeed BackUpCalc

Estimated size: 131072 MB
Actual size: 131112 MB
gawk: CalcTimeSpeed:30: (FILENAME=BackUpCalc FNR=96)
fatal: division by zero attempted

NOTE: I'm not getting any of the:
Average of minutes: With Calculated Value
Average Kbytes/sec: With Calculated Value

Anything further you can add?

I appreciate your help.
 
> fatal: division by zero attempted

This means that count++ was never executed.
Let's try again.

[tt]
# Set field-separator; this tells awk how to split $0
# into $1, $2, etc. In this case, "|" with possible
# surrounding whitespace (blanks or tabs) will be where
# the splits are made.
BEGIN { FS="[ \t]*[|][ \t]*" }

/Estimated size is / { split( $0, a, / is +/ )
estimate = a[2]
next
}

/ megabytes written to / {
actual = 0 + $0; next }


# This will start matching when field 1 ($1) is composed of
# whitespace (spaces or tabs) and "0"; it will stop matching
# when field 1 is optional whitespace and "100".
$1 ~ /^[ \t]*0$/, $1 ~ /^[ \t]*100$/ {
# If number of fields is 4, we have a data line.
if ( 4==NF )
{ count++
minutes += $2
rate += $4
}
}

END {
print "Estimated size:", estimate
print "Actual size: ", actual, "MB"

print "Average of minutes:", minutes/count
print "Average Kbytes/sec:", rate/count
}
[/tt]
 
This version is simpler and probably more robust.
[tt]
# Set field-separator; this tells awk how to split $0
# into $1, $2, etc. In this case, "|" with possible
# surrounding whitespace (blanks or tabs) will be where
# the splits are made.
BEGIN { FS="[ \t]*[|][ \t]*" }

/Estimated size is / {
split( $0, a, / is +/ )
estimate = a[2]
next
}

/ megabytes written to / {
actual = 0 + $0
next
}


# If number of fields is 4 and line contains
# " minutes of ", we have a data line.
4==NF && / minutes of / {
count++
minutes += $2
rate += $4
}

END {
print "Estimated size:", estimate
print "Actual size: ", actual, "MB"

print "Average of minutes:", minutes/count
print "Average Kbytes/sec:", rate/count
}
[/tt]
 
I wish I could say it worked - but here's what I get with your first script:

Command run: gawk -f CalcTimeSpeed2 BackUpCalc

Estimated size: 131072 MB
Actual size: 131112 MB
gawk: CalcTimeSpeed2:38: (FILENAME=BackUpCalc FNR=96)
fatal: division by zero attempted

NOTE: I also tried running this with my "awk" as well:

Command run: awk -f CalcTimeSpeed2 BackUpCalc

Estimated size: 131072 MB
Actual size: 131112 MB
Average of minutes: awk: 0602-566 Cannot divide by zero.
The input line number is 912. The file is BackUpCalc.
The source line number is 38.


And when running the "simpler and more robust" script:

Command run: gawk -f CalcTimeSpeed3 BackUpCalc

Estimated size: 131072 MB
Actual size: 131112 MB
gawk: CalcTimeSpeed3:39: (FILENAME=BackUpCalc FNR=96)
fatal: division by zero attempted

NOTE: I also tried running this one with my "awk" as well:

Command run: awk -f CalcTimeSpeed3 BackUpCalc

Estimated size: 131072 MB
Actual size: 131112 MB
Average of minutes: awk: 0602-566 Cannot divide by zero.
The input line number is 912. The file is BackUpCalc.
The source line number is 39.

If there's anything more I can do in regards to further clarification of file contents or script format, or anything like that, I'd be glad to furnish.

 
[tt]
BEGIN {

# Set field-separator; this tells awk how to split
# $0 (the line just read) into $1, $2, etc.
# The number of fields into which $0 is split is
# held in variable NF. In this case, "|" with
# possible surrounding whitespace (blanks or tabs)
# will be where the splits are made.
FS="[ \t]*[|][ \t]*"

if ( "OS" in ENVIRON && ENVIRON["OS"]~/^Windows/ )
stderr = "/dev/stderr"
else
stderr = "/dev/tty"

$0 = " 0 | 0 minutes of 1050 | 1 of 141772 | 4095"
if ( 4 != NF )
{ print "This awk splits $0 incorrectly."
print "Quitting."
fatal = 1
exit
}

}

/Estimated size is / {
split( $0, a, / is +/ )
estimate = a[2]
next
}

/ megabytes written to / {
actual = 0 + $0
next
}

{ printf "%-20s", "# of fields is " NF >stderr }

# If number of fields is 4 and line contains
# "minutes of", we have a data line.
4==NF && /minutes of/ {
# Notify user that we've found a data line.
printf "%-20s", "! ! Eureka! !" >stderr
# Add 1 to count.
count++
# Add number at beginning of field 2 to minutes.
minutes += $2
# Add field 4 to rate.
rate += $4
}

END {

if ( fatal ) exit

print ""
print "Estimated size:", estimate
print "Actual size: ", actual, "MB"

if ( 0 == count )
{ print "There was a problem."
print "No data lines were recognized."
exit
}

print "Average of minutes:", minutes/count
print "Average Kbytes/sec:", rate/count
}
[/tt]
When you run this, it will tell you the number of fields in each line; the maximal number should be 4. If no line has 4 fields, something is wrong.

Every time a data line is recognized, "Eureka!" will be printed.

If there are any other Awk users reading this, tell me whether it works for you.
 
Futurelet, your last but one script (the simpler more robust) works fine for me on SCO OpenServer (either awk or gawk) and give the following result with the data of the OP 1st post:[tt]
Estimated size: 141772 MB
Actual size: 141819 MB
Average of minutes: 124.571
Average Kbytes/sec: 4565.57[/tt]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 

Thanks, PHV. That's the output that I get.
I was beginning to doubt my code.
 
My guess is that the OP run the script against another data ...
 
Let's see if this helps - when I originally cut & pasted the "BackUpCalc" file contents, I altered the format to fit the page - here it is with no formatting:

NOTE: I believe the " ^M " - Control-M, indicate "NewLine" - again, this is a SYSBACK-generated file.

ESTIMATED PROGRESS
-------------+--------------------+------------------+--------------
% Complete | Elapsed Time | Megabytes | Kbytes/Sec
-------------+--------------------+------------------+--------------
^M^M 0 | 0 minutes of 1941| 1 of 131072 | 1152 ^M
0 | 0 minutes of 970 | 2 of 131072 | 2304 ^M
0 | 0 minutes of 647 | 3 of 131072 | 3456 ^M 0
| 0 minutes of 485 | 4 of 131072 | 4608 ^M 0 |
0 minutes of 388 | 5 of 131072 | 5760 ^M 0 | 0 mi
nutes of 647 | 6 of 131072 | 3456 ^M 0 | 0 minutes
of 554 | 7 of 131072 | 4032 ^M 0 | 0 minutes of 728
| 9 of 131072 | 3072 ^M 0 | 0 minutes of 647 |
10 of 131072 | 3456 ^M 0 | 0 minutes of 582 | 11 of
131072 | 3840 ^M 0 | 0 minutes of 529 | 12 of 13107
2 | 4224 ^M 0 | 0 minutes of 485 | 13 of 131072 |
4608 ^M 0 | 0 minutes of 597 | 14 of 131072 | 3744
^M 0 | 0 minutes of 554 | 15 of 131072 | 4032
0 | 0 minutes of 517 | 16 of 131072 | 4320 ^M
0 | 0 minutes of 485 | 18 of 131072 | 4608 ^M
0 | 0 minutes of 456 | 19 of 131072 | 4896 ^M 0
| 0 minutes of 431 | 20 of 131072 | 5184 ^M 0 | 0
minutes of 511 | 21 of 131072 | 4377 ^M 0 | 0 minute
s of 485 | 22 of 131072 | 4608 ^M 0 | 0 minutes of 4
62 | 23 of 131072 | 4838 ^M 0 | 0 minutes of 441 |
24 of 131072 | 5068 ^M 0 | 0 minutes of 422 | 25
of 131072 | 5299 ^M 0 | 0 minutes of 404 | 27 of 131
072 | 5529 ^M 0 | 0 minutes of 466 | 28 of 131072 |


Here's what I get using AWK:
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 0
# of fields is 1 # of fields is 0 # of fields is 1 # of fields is 1
# of fields is 4 # of fields is 1 # of fields is 421 # of fields is 422
# of fields is 422 # of fields is 422 # of fields is 422 # of fields is 421
# of fields is 422 # of fields is 422 # of fields is 422 # of fields is 422
# of fields is 422 # of fields is 421 # of fields is 422 # of fields is 422
# of fields is 422 # of fields is 421 # of fields is 422 # of fields is 422
# of fields is 422 # of fields is 421 # of fields is 422 # of fields is 422
# of fields is 422 # of fields is 421 # of fields is 422 # of fields is 422
# of fields is 422 # of fields is 422 # of fields is 421 # of fields is 422
# of fields is 422 # of fields is 422 # of fields is 422 # of fields is 422
# of fields is 421 # of fields is 422 # of fields is 422 # of fields is 422
# of fields is 421 # of fields is 422 # of fields is 422 # of fields is 422
# of fields is 421 # of fields is 422 # of fields is 422 # of fields is 422
# of fields is 421 # of fields is 422 # of fields is 422 # of fields is 422
# of fields is 421 # of fields is 397 # of fields is 1 # of fields is 421
this repeats until:
# of fields is 422 # of fields is 422 # of fields is 399 # of fields is 1
then lots of lines similar to the first - then this:
# of fields is 0 # of fields is 1 # of fields is 1 # of fields is 1
more lines similar to first - then this:
# of fields is 399 # of fields is 1 # of fields is 421 # of fields is 422
more similar lines - then it ends with this:
# of fields is 399 # of fields is 0 # of fields is 1 # of fields is 0
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 0 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1
Estimated size: 131072 MB
Actual size: 131112 MB
There was a problem.
No data lines were recognized.

Here's the entire GAWK results:
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 0
# of fields is 1 # of fields is 0 # of fields is 1 # of fields is 1
# of fields is 4 # of fields is 1 # of fields is 21856# of fields is 1
# of fields is 21859# of fields is 1 # of fields is 21859# of fields is 1
# of fields is 21859# of fields is 1 # of fields is 18052# of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 0 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 3808 # of fields is 1
# of fields is 21859# of fields is 1 # of fields is 21859# of fields is 1
# of fields is 21859# of fields is 1 # of fields is 21859# of fields is 1
# of fields is 21859# of fields is 1 # of fields is 21859# of fields is 1
# of fields is 21859# of fields is 1 # of fields is 21859# of fields is 1
# of fields is 21859# of fields is 1 # of fields is 21859# of fields is 1
# of fields is 21859# of fields is 0 # of fields is 1 # of fields is 0
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 0 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1
Estimated size: 131072 MB
Actual size: 131112 MB
There was a problem.
No data lines were recognized.
 
One more NOTE: the previous post showed the file contents resulting from the usage of the "more" command - for example:

Command run: more BackUpCalc

Here is the format of the same file resulting from the "pg" command - example: NOTE: there are no "^M" Control-Ms.

Command run: pg BackUpCalc

ESTIMATED PROGRESS
-------------+--------------------+------------------+--------------
% Complete | Elapsed Time | Megabytes | Kbytes/Sec
-------------+--------------------+------------------+--------------
0 | 0 minutes of 554 | 15 of 131072 | 4032
0 | 0 minutes of 416 | 31 of 131072 | 5376
0 | 0 minutes of 462 | 47 of 131072 | 4838
0 | 0 minutes of 485 | 63 of 131072 | 4608
0 | 0 minutes of 499 | 78 of 131072 | 4480
0 | 0 minutes of 508 | 94 of 131072 | 4398
0 | 0 minutes of 515 | 110 of 131072 | 4342
0 | 0 minutes of 520 | 126 of 131072 | 4300
0 | 0 minutes of 523 | 141 of 131072 | 4269
0 | 0 minutes of 499 | 157 of 131072 | 4480
0 | 0 minutes of 491 | 173 of 131072 | 4548
0 | 0 minutes of 485 | 189 of 131072 | 4608
0 | 0 minutes of 480 | 204 of 131072 | 4659
0 | 0 minutes of 475 | 220 of 131072 | 4704
0 | 0 minutes of 471 | 236 of 131072 | 4743
0 | 0 minutes of 468 | 252 of 131072 | 4778
0 | 0 minutes of 465 | 267 of 131072 | 4810
0 | 1 minutes of 470 | 283 of 131072 | 4759
0 | 1 minutes of 474 | 299 of 131072 | 4714
0 | 1 minutes of 471 | 315 of 131072 | 4743
0 | 1 minutes of 468 | 330 of 131072 | 4770
0 | 1 minutes of 472 | 346 of 131072 | 4730

Hope this helps.
 
Try RS="[\r\n]" in the BEGIN section.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I think that ^M is a carriage return.

Use something like this to create a cleaned-up version of the file:
[tt]
{ gsub(/\r/, "\n") ; print }
[/tt]
 
I tried PHVs method and I added the following line to the script:
+14 RS="[\r\n]"

it seems to work - except it prints all those unwanted lines:

here's what the first few lines look like:

# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 0
# of fields is 1 # of fields is 0 # of fields is 1 # of fields is 1
# of fields is 4 # of fields is 1 # of fields is 0 # of fields is 0
# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
Then it repeats many of the same lines above and ends like this:

# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
# of fields is 4 ! ! Eureka! ! # of fields is 4 ! ! Eureka! !
# of fields is 0 # of fields is 1 # of fields is 0 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 0 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1 # of fields is 1 # of fields is 1 # of fields is 1
# of fields is 1
Estimated size: 131072 MB
Actual size: 131112 MB
Average of minutes: 200.016
Average Kbytes/sec: 5498.64

- so I commented out the following lines of the script:

+43 # { printf "%-20s", "# of fields is " NF >stderr }
+49 # printf "%-20s", "! ! Eureka! !" >stderr

- And it just prints out the good stuff - If you think I need to tweak the script any other way - Just let me know and I'm out of your hair!

Thanks ALL for your help - great job!
 
a
star.gif
to futurelet for perseverance ;)

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Thanks, Vlad. I think I earned that one.

tbenn, you did right to comment out those lines. However, if you had left them untouched and had redirected output with "awk -f script.awk infile >outfile", only the good stuff would have wound up in the file; the rest would have remained on the screen.
 
FYI,

yet another way to redirect to stderr from within awk:

nawk -f script.awk inPut.txt 2> stderr.out

Code:
BEGIN {
   stderr="cat 1>&2"
}

{
   printf("This goes to stderr\n") | stderr
   printf("This goes to stdout\n");
}

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top