Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Output Multiple Field from dataBase file Post 39830 by Dennz on Monday 1st of September 2003 12:41:45 PM
Old 09-01-2003
Output Multiple Field from dataBase file

I believe this is what i was trying to say previously.

I have dataBase1.db
its a database for our subscribers.
Now we have a Tool for dumping this dataBase1 file
already and we are able to dump it into a file.

the file will Look Like this after using

dataBase1_dump -a >file.out <-- dataBase Tool.


dataBase1 TABLE DATA Example
==================


Table SUB
------------------------------------
Subscriber1 : 15DigitNumber
Field1 : 11DigitNumber
Field2 : 11DigitNumber
Field3 : X
Field4 : X
Field5 : 13DigitNumber
Field6 : 13DigitNumber
Field7 : 4DigitNumber
Subscriber2 : 15DigitNumber
Field1 : 11DigitNumber
Field2 : 11DigitNumber
Field3 : X
Field4 : X
Field5 : 13DigitNumber
Field6 : 13DigitNumber
Field7 : 4DigitNumber
Subscriber3 : 15DigitNumber
Field1 : 11DigitNumber
Field2 : 11DigitNumber
Field3 : X
Field4 : X
Field5 : 13DigitNumber
Field6 : 13DigitNumber
Field7 : 4DigitNumber

This will output a file with for now almost 13,000 subscribers.

WHat i need is to output:

( Line1 of output File ) Subscriber1
( Line2 of output File ) Field1 of Subscriber1
( Line3 of output File ) Field2 of Subscriber1
( Line4 of output File ) Field4 of Subscriber1
( Line5 of output File ) Subscriber2
( Line6 of output File ) Field1 of Subscriber2
( Line7 of output File ) Field2 of Subscriber2
( Line8 of output File ) Field4 of Subscriber2
( Line9 of output File ) Subscriber3
( Line10 of output File ) Field1 of Subscriber3
( Line11 of output File ) Field2 of Subscriber3
( Line12 of output File ) Field4 of Subscriber3

Up to subscriber 13,000...

Again Thank You for taking the time looking into this. It will be
a great help to me.

Last edited by Dennz; 09-01-2003 at 03:05 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check for the value of one particular field and give output in a different file

hi i need to check for the value of one particular field : in the output file. the file may contain many such records as below how to ???? *** Throttled with base name + key params! : : -518594328 : les.alarm.LBS12005 : les.alarm.LBS12005 : les : lessrv1 : les : 2328 : 0... (7 Replies)
Discussion started by: aemunathan
7 Replies

2. Shell Programming and Scripting

how to extract the data from database (oracle) and send the output as an .xls file?

Hi, How to extract the data from Oracle database and sent the output data to mails using mailx command with .xls attachement? Here i know how to connect the database using unix shell script and how to use the mailx command in UNIX script But i don't know how to use the .xls format file (i... (1 Reply)
Discussion started by: psiva_arul
1 Replies

3. Shell Programming and Scripting

Handling multiple fields of a database file for toupper() function in awk

hello everyone.... script is: To convert the contents of a database file into uppercase my code is: printf "%s\n" , $2 | awk '{print toupper($2)}' emp.lst i m able to do only for one field.....didn't get any sources for handling multiple fields. please suggest me for multiple... (1 Reply)
Discussion started by: Priyanka Bhati
1 Replies

4. Shell Programming and Scripting

How to split file into multiple files using awk based on 1 field in the file?

Good day all I need some helps, say that I have data like below, each field separated by a tab DATE NAME ADDRESS 15/7/2012 LX a.b.c 15/7/2012 LX1 a.b.c 16/7/2012 AB a.b.c 16/7/2012 AB2 a.b.c 15/7/2012 LX2 a.b.c... (2 Replies)
Discussion started by: alexyyw
2 Replies

5. Shell Programming and Scripting

Compare two files Field by field and output the result in another file

Hi Friends, Need Help. I have file1.txt as File1.txt |123|A|7267|Hyder|Cross|Sell|7801 |995|A|7051|2008|Lunar|New|Year|Promotion|7801 |996|A|7022|Q108|Targ|Prospect|&|SSCC|Savings|Promo|7801 |997|A|7182|Q1|Feb-Apr|08|Credit|ITA|PA|SBA|Campaign|7801 File2.txt... (7 Replies)
Discussion started by: i150371485
7 Replies

6. Shell Programming and Scripting

Plz Help. Compare 2 files field by field and get the output in another file.

Hi Freinds, I have 2 files . one is source.txt and second one is target.txt. I want to keep source.txt as baseline and compare target.txt. please find the data in 2 files and Expected output. Source.txt 1|HYD|NAG|TRA|34.5|1234 2|CHE|ESW|DES|36.5|134 3|BAN|MEH|TRA|33.5|234... (5 Replies)
Discussion started by: i150371485
5 Replies

7. UNIX for Dummies Questions & Answers

ID incorrect field values in dat file and output to new file

Hi All I have a .dat file, the values are seperated by ". I wish to identify all field values in field 14 that are not '01-APR-2013' band then copy those records to a new file. Can anyone suggest the UNIX command required. Thanks in advance Andy (2 Replies)
Discussion started by: aurum1313
2 Replies

8. Linux

How do I format a Date field of a .CSV file with multiple commas in a string field?

I have a .CSV file (file.csv) whose data are all enclosed in double quotes. Sample format of the file is as below: column1,column2,column3,column4,column5,column6, column7, Column8, Column9, Column10 "12","B000QRIGJ4","4432","string with quotes, and with a comma, and colon: in... (3 Replies)
Discussion started by: dhruuv369
3 Replies

9. Shell Programming and Scripting

Grep from multiple patterns multiple file multiple output

Hi, I want to grep multiple patterns from multiple files and save to multiple outputs. As of now its outputting all to the same file when I use this command. Input : 108 files to check for 390 patterns to check for. output I need to 108 files with the searched patterns. Xargs -I {} grep... (3 Replies)
Discussion started by: Diya123
3 Replies

10. Shell Programming and Scripting

Get output of multiple pattern match from first field to a file

Hi All, Greetings! I have a file of 40000+ lines with different entries, I need matching entries filterd out to their files based on first filed pattern for the matching : For example: All server1 entries (in field1) to come together with its path in 2nd field. The best output I want... (9 Replies)
Discussion started by: rveri
9 Replies
VGDISPLAY(8)						      System Manager's Manual						      VGDISPLAY(8)

NAME
vgdisplay - display attributes of volume groups SYNOPSIS
vgdisplay [-A|--activevolumegroups] [-c|--colon] [-s|--short] [-v|--verbose] [-d|--debug] [-h|--help] [--ignorelockingfailure] [--ignoreskippedcluster] [--nosuffix] [-P|--partial] [--units hHbBsSkKmMgGtTpPeE] [--version] [VolumeGroupName [VolumeGroupName...]] vgdisplay --columns|-C [--aligned] [-d|--debug] [-h|-?|--help] [--ignorelockingfailure] [--ignoreskippedcluster] [--noheadings] [--nosuf- fix] [-o|--options [+]Field1[,Field2...]] [-O|--sort [+|-]Key1[,[+|-]Key2...]] [-P|--partial] [--separator Separator] [--unbuffered] [--units hHbBsSkKmMgGtTpPeE] [-v|--verbose] [--version] [VolumeGroupName [VolumeGroupName...]] DESCRIPTION
vgdisplay allows you to see the attributes of VolumeGroupName (or all volume groups if none is given) with it's physical and logical vol- umes and their sizes etc. vgs(8) is an alternative that provides the same information in the style of ps(1). OPTIONS
See lvm(8) for common options and vgs(8) for options given with --columns. -A, --activevolumegroups Only select the active volume groups. The volume group is considered active if at least one of its logical volumes is active. -c, --colon Generate colon separated output for easier parsing in scripts or programs. N.B. vgs(8) provides considerably more control over the output. The values are: 1 volume group name 2 volume group access 3 volume group status 4 internal volume group number 5 maximum number of logical volumes 6 current number of logical volumes 7 open count of all logical volumes in this volume group 8 maximum logical volume size 9 maximum number of physical volumes 10 current number of physical volumes 11 actual number of physical volumes 12 size of volume group in kilobytes 13 physical extent size 14 total number of physical extents for this volume group 15 allocated number of physical extents for this volume group 16 free number of physical extents for this volume group 17 uuid of volume group -s, --short Give a short listing showing the existence of volume groups. -v, --verbose Display verbose information containing long listings of physical and logical volumes. If given twice, also display verbose runtime information of vgdisplay's activities. --version Display version and exit successfully. --columns|-C Display output in columns, the equivalent of vgs(8). Options listed are the same as options given in vgs(8). SEE ALSO
lvm(8), vgs(8), pvcreate(8), vgcreate(8), lvcreate(8) Sistina Software UK LVM TOOLS 2.02.105(2)-RHEL7 (2014-03-26) VGDISPLAY(8)
All times are GMT -4. The time now is 06:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy