Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Modifying/combining two text outputs Post 303030067 by jeffs42885 on Tuesday 5th of February 2019 05:27:50 PM
Old 02-05-2019
Modifying/combining two text outputs

greetings,

I have what seems to be a fairly complex task at hand. I am dealing with 3 outputs from a database.

a) Listing of tables. The first 3 characters are always an identifier of an application. See in part b -

Example-

Code:
select tablename from system.tables
ABC1
ABC2
RFV1


b) Each table has a field I need to capture-

Code:
select docname from ABC1
DOCUMENT1
DOCUMENT2
DOCUMENT3

c) The first three characters of that table name, is always the 3 digit identifier of a specific application..

Code:
select identifier, actualname from application
ABC,DataDriven

SO- What I need to do is combine everything into a distinct CSV file, where I have something like this

Code:
(docnameFromABC1),(actualName)
DOCUMENT1, DataDriven
DOCUMENT2, DataDriven

My problem is that I can't join the tables on a certain field. Can anyone think of a fancy way i may be able to use a where clause, or a like clause, or something..or do some fancy awk work on this?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help need in modifying the text of .txt file

Hi All, I've written a shell script in which i defined two varibles for example: str=1.0.0.15 timeStamp=2008.03.08 now using this varibles i need to modify a text file. The text content looks like this ************************ * packageNumber : 1.0.0.14 * * date :... (2 Replies)
Discussion started by: vinna
2 Replies

2. Shell Programming and Scripting

Inserting text and modifying the file

I am in a dire need of doing this job , please help from shell script or perl script. It will be highly appreciated. Please have a look at the following INPUT file; The first 14 rows are not of interest but I want them to be included in the output file as they are. From the row 14... (3 Replies)
Discussion started by: digipak
3 Replies

3. Shell Programming and Scripting

Combining two text lines into one

Here is the sample file: 646 STARTED Tue Dec 30 06:38:53 2008 Job DdCustXAddr_brad has been reset. 647 STARTED Tue Dec 30 06:38:54 2008 Starting Job DdCustXAddr_brad. (...) 704 STARTED Tue Dec 30 06:49:02 2008 Job DdCustXAddr_brad aborted. I want to combine every non-numbered line... (4 Replies)
Discussion started by: mfavero
4 Replies

4. Shell Programming and Scripting

create outputs from other command outputs

hi friends, The code: i=1 while do filename=`/usr/bin/ls -l| awk '{ print $9}'` echo $filename>>summary.csv #Gives the name of the file stored at column 9 count=`wc -l $filename | awk '{print $1}'` echo $count>>summary.csv #Gives just the count of lines of file "filename" i=`expr... (1 Reply)
Discussion started by: rajsharma
1 Replies

5. Shell Programming and Scripting

Searching for a particular string and modifying text within block of data

Hi Forum. Is there a quick way to do the following search/replace within a block of data? I tried to google the solution but didn't really know what to look for. I have the following text file (I want to search for a particular string "s_m_f_acct_txn_daily_a1" and replace the... (5 Replies)
Discussion started by: pchang
5 Replies

6. UNIX for Dummies Questions & Answers

Combining two text files as columns?

I have one space delimited file with multiple columns and one tab delimited file with multiple columns (They have the same number of rows). I want to basically combine these two text files into a new text file by column. How would I go about doing that? (1 Reply)
Discussion started by: evelibertine
1 Replies

7. Shell Programming and Scripting

Text Formating or Modifying

Hi Experts, I have a text exactly like below in a file: id item_id item_date prin_mkt_val --------------------------- --------------------------- ------------------------------- ------------------------ ... (1 Reply)
Discussion started by: apatil65
1 Replies

8. Shell Programming and Scripting

Small query on modifying the text of file

Hi, I have file with the following text, /analysis2012/533/mc_S10_533/DYJets50/vgtree_1_1_33l.root /analysis2012/533/mc_S10_533/DYJets50/vgtree_2_5_33l.root /analysis2012/533/mc_S10_533/DYJets50/vgtree_6_7_33l.root and many such files. For some operation on these files, I would like... (9 Replies)
Discussion started by: emily
9 Replies

9. Shell Programming and Scripting

New code for modifying text files in a folder

Hi I want to create a code that can do this for all text files in a folder. The filenames are all listed in the following syntax UNIQUEID-LABID_ - .txt Each file has a unique ID and a different name and the content in the file looks like this: Kinship Analysis Report --- Likelihood... (12 Replies)
Discussion started by: kylle345
12 Replies

10. Shell Programming and Scripting

Removing duplicate sequences and modifying a text file

Hi. I've tried several different programs to try and solve this problem, but none of them seem to have done exactly what I want (and I need the file in a very specific format). I have a large file of DNA sequences in a multifasta file like this, with around 15 000 genes: ... (2 Replies)
Discussion started by: 4galaxy7
2 Replies
PROCMETER3(1)						      General Commands Manual						     PROCMETER3(1)

NAME
procmeter3, procmeter3-xaw - A user friendly system monitoring program. SYNOPSIS
procmeter3|procmeter3-xaw [-w <hint1>[,<hint2>]] [-h|--help] [--rc=<filename>] [--...] [...] [X windows options] DESCRIPTION
ProcMeter Displays one or more pieces of information about the operating system and other resources. Most of the information that is dis- played comes from the /proc filesystem. The program is modular and very configurable. OPTIONS
The command line options are described below. -h Provides a help message listing the available outputs. This will be different for different computers depending on the Linux kernel version that is being used and the hardware/software that is configured. -w Gives Extended Window Manager hints (EWMH) to change the way that the Window Manager treats the ProcMeter3 window. Implemented hints are: above, below, skip_pager, skip_taskbar, sticky. You can give more than one hint separated by commas (e. g. -w above,skip_taskbar,sticky), or use -w multiple times (e. g. -w above -w sticky). --rc=<filename> Load the specified .procmeterrc file in stead of the searching in the usual places. --... A list of configuration file options that will override the values in the .procmeterrc file. The format of these options is (for example) --resources.background=grey50 which is equivalent to the entry in the .procmeterrc file of [resources] background = grey50 All spaces around the equal sign must be removed and if spaces are required in the value on the right hand side then quotes must be used around the entire command line option. ... A list of names of outputs that are to be displayed. This can include any of the outputs that are available (see the -h option). For the CPU usage is in a module named Statistics with an output named CPU and there are graph (-g), text (-t) and bar (-b) options. To display the CPU usage graph you would use the command line option Statistics.CPU-g X windows options The standard set of X Windows program options, see X(1) for information. These include -geometry to set the size of the window, -display to set the display and other general X window options. USAGE
When started the program will display all of the requested information in a set of output panels (vertically aligned by default). Each output can be either a graph, text or bar, and can have a label indicating what it represents. The outputs that are displayed are those from the command line and those from the .procmeterrc configuration file. The left mouse button will produce a menu of options that are specific to the output that is selected. The Properties option on this menu will give more detailed information about the origin and meaning of the information that is displayed. When the properties information window is displayed, clicking on another output will change the displayed information. The Move to Above and Move to Below options allow the output to be moved around in the window. Selecting one of these options will change the mouse cursor to a hand, use this to select another output. The output that was selected first will be moved to above or below the output that was selected second. The Run option on the menu (which may not be available on all outputs) will run the specified command. This may be to display a list of running processes, show the amount of free memory or disk space for example. This menu option is configurable in the .procmeterrc file. The right mouse button will produce a set of menus that list the modules that are available and for each of them the available set of out- puts. There are three types of output, text and two graphical outputs, these are indicated in the sub-menus by icons. Selecting one of the outputs from a sub-menu will cause that output to be displayed if it is not already visible. If it is currently displayed then it will be disabled. Those that are currently displayed are indicated by a marker to the left in the sub-menu. When the output is added to the window it will be placed at the bottom, use the left mouse button to move it if required. The middle mouse button will display the sub-menu that is associated with the module for the output that is selected. This is one of sub- menus that are found with the right mouse button. MODULES
The modules that are available for procmeter3 and procmeter3-xaw are described in the procmeter3_modules(1) manual page. X RESOURCES
As with all X Window programs X resources can be used. For this version of ProcMeter (compared to previous versions) this is not the default method of configuring the program. The file $HOME/.procmeterrc contains the configuration information. SEE ALSO
X(1) procmeterrc(5) procmeter3_modules(1) AUTHOR
Andrew M. Bishop 1998-2008 July 3, 2010 PROCMETER3(1)
All times are GMT -4. The time now is 03:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy