Hi colleagues, thank you for you fast response,
I have run this commands
Code:
db2 -x "select substr(TBSPACE,1,20) TABLESPACE from syscat.tables where tabschema = 'MIATLAS' and tabname like '%TH' group by TBSPACE order by 1" | while read tablespace
do
db2 "list tablespaces show detail" |grep -p -w $tablespace | egrep "Name|Total pages|Free pages|Page size" | while read label equals value rest
do
echo "$label $equals $value $rest\t\c"
done ; echo
done ; echo
the output is as follows
Code:
Name = TSADOR Total pages = 14991360 Free pages = 5345152 Page size (bytes) = 32768
Name = TSHISTNEW Total pages = 4186112 Free pages = 1276544 Page size (bytes) = 32768
Name = TSHISTTI Total pages = 6279168 Free pages = 1991168 Page size (bytes) = 32768
I need to do a multiplication for the output to be like this.
Code:
Name = TSADOR Total pages = 14991360 Free pages = 5345152 Page size (bytes) = 32768 Mb=Free pages*Page size (bytes)
Name = TSHISTNEW Total pages = 4186112 Free pages = 1276544 Page size (bytes) = 32768 Mb=Free pages*Page size (bytes)
Name = TSHISTTI Total pages = 6279168 Free pages = 1991168 Page size (bytes) = 32768 Mb=Free pages*Page size (bytes)
thanks for your valuable help.
Moderator's Comments:
Code tags for code, please.
Last edited by Corona688; 06-25-2012 at 03:11 PM..
Hi all,
I use the diff command and got the output:
$> diff -e file1.txt file2.txt
15a
000675695 Yi Chen Chen 200520 EASY 50 2/28/05 0:00 SCAD Debit Card Charge
.
12a
000731176 Sarah Anderson 200520 EASY 25 2/28/05 0:00 SCAD Debit Card Charge
.
11a... (5 Replies)
I often use "ps -ef" command to list all running processes. Now i want to customize the output to show only 2 parts: CMD and UID as below:
/bin/bash /usr/bin/run-parts /etc/cron.weekly root
/usr/sbin/httpd apache
/usr/sbin/httpd apache
/usr/sbin/httpd apache
I use ps -ef | awk '{print $8"... (3 Replies)
Can anyone help me with a shell script that can do the following:
I have a data in fasta format (first line is the header, followed by a sequence of characters).
>ALLLY
GGCCCCTCGAGCCTCGAACCGGAACCTCCAAATCCGAGACGCTCTGCTTATGAGGACCTC
GAAATATGCCGGCCAGTGAAAAAATCTTGTGGCTTTGAGGGCTTTTGGTTGGCCAGGGGC... (5 Replies)
Hi ,
I have a text file noname.txt containing 1000+ records like this. One of the record I have given below.
Input will b e like this
BOT:
2010/06/01 00:25:59
21 = "private"
Access-Method = 31
NCC = GBR
01 = "340806@osiris.fr.ft"
04 =... (2 Replies)
We have the following output:
server1_J00_data_20120711122243
server1_J00_igs_20120711122243
server1_J00_j2ee_20120711122243
server1_J00_sec_20120711122243
server1_J00_data_20120711131819
server1_J00_igs_20120711131819
server1_J00_j2ee_20120711131819
server2_J00_data_20120711122245... (10 Replies)
I have below file listing
] ls -1 *.txt
MISTradesReport_141105_d130240_VOLCKER_EMEA_LOANIQ_FEED_2013-12-24.txt
MISTradesReport_141106_d130240_VOLCKER_NA_LOANIQ_FEED_2013-12-24.txt
MISTradesReport_141107_d130240_VOLCKER_EMEA_CDS_CRDI_FEED_2013-12-24.txt... (4 Replies)
Hi there. I need to reformat a large file. Here is a sample of the file.
NETIK0102_UCS_Boot_a,NETIK0102_UCS_Boot_b
5200 2438 70G
5200 2439 70G
NETIK0102_UCS_HBA0_a,NETIK0102_UCS_HBA1_b,NETIK0102_UCS_HBA2_a,NETIK0102_UCS_HBA3_b
2673 19D7 55G
2673 19C0 30G
2673 19F5 120G... (5 Replies)
I need to rearrange the output but i am unable to arrange it to match the format. In the output i need NAME=\"To in the column .
Bash:
#!/bin/bash
cd /cygdrive/c/output/a
cat *.txt > output.txt
i=/cygdrive/c/output/a/output.csv
#echo "NE_Name, Source, Destination, OSPF_AREA_ID"... (4 Replies)
The below awk improved bu @MadeInGermany, works great as long as the input file has data in it in the below format:
input
chrX 25031028 25031925 chrX:25031028-25031925 ARX 631 18
chrX 25031028 25031925 chrX:25031028-25031925 ARX 632 14... (3 Replies)
Discussion started by: cmccabe
3 Replies
LEARN ABOUT OPENSOLARIS
ptob
ptob(9F) Kernel Functions for Drivers ptob(9F)NAME
ptob - convert size in pages to size in bytes
SYNOPSIS
#include <sys/ddi.h>
unsigned long ptob(unsigned long numpages);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
PARAMETERS
numpages Size in number of pages to convert to size in bytes.
DESCRIPTION
This function returns the number of bytes that are contained in the specified number of pages. For example, if the page size is 2048, then
ptob(2) returns 4096. ptob(0) returns 0.
RETURN VALUES
The return value is always the number of bytes in the specified number of pages. There are no invalid input values, and no checking will be
performed for overflow in the case of a page count whose corresponding byte count cannot be represented by an unsigned long. Rather, the
higher order bits will be ignored.
CONTEXT
The ptob() function can be called from user, interrupt, or kernel context.
SEE ALSO btop(9F), btopr(9F), ddi_ptob(9F)
Writing Device Drivers
SunOS 5.11 16 Jan 2006 ptob(9F)