Sponsored Content
Full Discussion: Report with mutiple files.
Top Forums Shell Programming and Scripting Report with mutiple files. Post 13870 by Cameron on Thursday 24th of January 2002 02:31:01 PM
Old 01-24-2002
Data Report with mutiple files.

Hi all,
In the process of creating CPU reports.
I've already used `sar` to create a daily file, then monthly reports for CPU usage (which is averaged across all 4 CPU's).
I've now used `cpusar -P ?`(?=CPU#) to collect individual CPU data and have four files for each day which is great.

The problem I'm trying to work out is how to script the loops to get what details I need.
The filename for the daily cpusar files are like the following...
-r--r--r-- 1 operator group 4123 Jan 22 23:55 cpu022.1
-r--r--r-- 1 operator group 4123 Jan 22 23:55 cpu022.2
-r--r--r-- 1 operator group 4123 Jan 22 23:55 cpu022.3
-r--r--r-- 1 operator group 4123 Jan 22 23:55 cpu022.4
-r--r--r-- 1 operator group 4123 Jan 23 23:55 cpu023.1
-r--r--r-- 1 operator group 4123 Jan 23 23:55 cpu023.2
-r--r--r-- 1 operator group 4123 Jan 23 23:55 cpu023.3
-r--r--r-- 1 operator group 4123 Jan 23 23:55 cpu023.4
-r--r--r-- 1 operator group 4123 Jan 24 23:55 cpu024.1
-r--r--r-- 1 operator group 4123 Jan 24 23:55 cpu024.2
-r--r--r-- 1 operator group 4123 Jan 24 23:55 cpu024.3
-r--r--r-- 1 operator group 4123 Jan 24 23:55 cpu024.4

The file name is made up with the Julian date and the CPU#.

I'm wanting to create a report similar to the following, cycling backwards 30 days from the current Julian date.
Code:
       ---- CPU #1 ----  ---- CPU #2 ----  ---- CPU #3 ----  ---- CPU #4 ----
Date   Avg Pek Pek-Time  Avg Pek Pek-Time  Avg Pek Pek-Time  Avg Pek Pek-Time  
01/01  000 000 00:00:00  000 000 00:00:00  000 000 00:00:00  000 000 00:00:00

Any suggestions? I've really only got basic scripting skills presently and know little(if any) `awk` or `perl`.

Last edited by Cameron; 01-24-2002 at 03:40 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

removing mutiple files

I have a script which removes files (if they exist) Here is a cut down example of the script. Variables file1,file2 etc have already been initialized #!/bin/bash if then \rm file1 fi if then \rm file2 fi if then \rm file3 fi if then \rm file4 (9 Replies)
Discussion started by: run_time_error
9 Replies

2. Shell Programming and Scripting

Sending mutiple files thru email to lotus notes

Hi All, I am currently using the following script to send the single file to one/more email addresses. I need to send mutilple files at same time, are there anyway I could modify the script or write new one to accomplish the same. Script *************** #!/bin/ksh # Author: Manish... (4 Replies)
Discussion started by: lapisguy
4 Replies

3. Shell Programming and Scripting

Mutiple For loops - moving files to another directory

I need to clean out some application subdirectories from backup scripts we used to rename to various backup extensions just in case the script failed in production and we need to rollback. I will be moving these old scripts to a staging directory and then removing them after 30 days (I have the... (9 Replies)
Discussion started by: tekster757
9 Replies

4. IP Networking

Mutiple nics on Freebsd 7.0

I had the pleasure of having a gig nic given to me this week, which also appears on the hardware list of FreeBSD. What I would LIKE to do is: 1). Set my 10/100 nick as the dedicated outside/internet connection with a lan ip of 192.168.1.100 2). Set the gig nick as the dedicated... (2 Replies)
Discussion started by: droolin
2 Replies

5. UNIX for Dummies Questions & Answers

copy mutilple files to mutiple folders

Hi, I just started to learn shell progamming and just can't get my head around the following problem. I need to do the following: I have a folder which contains 100+ subfolders. Inside these subfolders there is one folder named 'Morph' and several jpg's. I need to copy all the files into... (4 Replies)
Discussion started by: M474746
4 Replies

6. Shell Programming and Scripting

Renaming mutiple files with hyphens in name

I have searched throught a host of threads to figure out how to rename mutiple files at once using a script. I need to convert 200+ files from: fKITLS_120605-0002-00001-000001.hdr to eStroop_001.hdr fKITLS_120605-0002-00002-000002.hdr to eStroop_002.hdr and so forth.... What is... (5 Replies)
Discussion started by: akenne3
5 Replies

7. UNIX for Advanced & Expert Users

Remove first line from mutiple files

How to remove the first line from multiple files and use it as source to the jobs. Only at the runtime it should remove the first line not in the file . (1 Reply)
Discussion started by: etldeveloper
1 Replies

8. Shell Programming and Scripting

how to replace words in mutiple files under the same directory

I would like to get help to find how to replace word in files from command line instead of to vi to each file. This is the command i am running now. grep <old word> * vi (file with the word found in it) 1,$s/<old word>/<new word>/g It would very helpful if I can combine these in one... (2 Replies)
Discussion started by: ywu081006
2 Replies

9. Shell Programming and Scripting

paste mutiple files in a loop

file1.txt file2.txt file3.txt desired output is each file is in the same directory, hasthe same number of columns but different rows. i want to be able to paste them into one file. thanks! (5 Replies)
Discussion started by: johnkim0806
5 Replies

10. Shell Programming and Scripting

Split large xml into mutiple files and with header and footer in file

Split large xml into mutiple files and with header and footer in file tried below it splits unevenly and also i need help in adding header and footer command : csplit -s -k -f my_XML_split.xml extrfile.xml "/<Document>/" {1} sample xml <?xml version="1.0" encoding="UTF-8"?><Recipient>... (36 Replies)
Discussion started by: karthik
36 Replies
std::decimal::decimal32(3)				     Library Functions Manual					std::decimal::decimal32(3)

NAME
std::decimal::decimal32 - SYNOPSIS
Public Types typedef float __decfloat32 __attribute__ ((mode(SD))) Public Member Functions decimal32 (decimal64 __d64) decimal32 (decimal128 __d128) decimal32 (float __r) decimal32 (double __r) decimal32 (long double __r) decimal32 (int __z) decimal32 (unsigned int __z) decimal32 (long __z) decimal32 (unsigned long __z) decimal32 (long long __z) decimal32 (unsigned long long __z) decimal32 (__decfloat32 __z) __decfloat32 __getval (void) void __setval (__decfloat32 __x) decimal32 & operator*= (decimal32 __rhs) decimal32 & operator*= (decimal64 __rhs) decimal32 & operator*= (decimal128 __rhs) decimal32 & operator*= (int __rhs) decimal32 & operator*= (unsigned int __rhs) decimal32 & operator*= (long __rhs) decimal32 & operator*= (unsigned long __rhs) decimal32 & operator*= (unsigned long long __rhs) decimal32 & operator*= (long long __rhs) decimal32 & operator++ () decimal32 operator++ (int) decimal32 & operator+= (int __rhs) decimal32 & operator+= (decimal32 __rhs) decimal32 & operator+= (decimal64 __rhs) decimal32 & operator+= (decimal128 __rhs) decimal32 & operator+= (unsigned int __rhs) decimal32 & operator+= (long __rhs) decimal32 & operator+= (unsigned long __rhs) decimal32 & operator+= (long long __rhs) decimal32 & operator+= (unsigned long long __rhs) decimal32 & operator-- () decimal32 operator-- (int) decimal32 & operator-= (long __rhs) decimal32 & operator-= (int __rhs) decimal32 & operator-= (long long __rhs) decimal32 & operator-= (unsigned long long __rhs) decimal32 & operator-= (unsigned long __rhs) decimal32 & operator-= (decimal128 __rhs) decimal32 & operator-= (unsigned int __rhs) decimal32 & operator-= (decimal32 __rhs) decimal32 & operator-= (decimal64 __rhs) decimal32 & operator/= (decimal32 __rhs) decimal32 & operator/= (long long __rhs) decimal32 & operator/= (unsigned long long __rhs) decimal32 & operator/= (unsigned long __rhs) decimal32 & operator/= (decimal64 __rhs) decimal32 & operator/= (unsigned int __rhs) decimal32 & operator/= (decimal128 __rhs) decimal32 & operator/= (long __rhs) decimal32 & operator/= (int __rhs) Detailed Description 3.2.2 Class decimal32. Definition at line 227 of file decimal. Constructor &; Destructor Documentation std::decimal::decimal32::decimal32 (__decfloat32__z) [inline] Conforming extension: Conversion from scalar decimal type. Definition at line 251 of file decimal. Author Generated automatically by Doxygen for libstdc++ from the source code. libstdc++ Tue Jun 10 2014 std::decimal::decimal32(3)
All times are GMT -4. The time now is 05:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy