Sponsored Content
Top Forums Shell Programming and Scripting help with generate a new text Post 302703667 by ment0smintz on Thursday 20th of September 2012 11:32:20 PM
Old 09-21-2012
Quote:
Originally Posted by elixir_sinari
Use nawk or /usr/xpg4/bin/awk instead of awk.
nope still cant work Smilie

---------- Post updated 09-21-12 at 10:51 AM ---------- Previous update was 09-20-12 at 06:22 PM ----------

Quote:
Originally Posted by ment0smintz
textfile 1
Code:
BRM501,LOGON,BX12_28,2012 SEP 20 15:01:58
BRM502,LOGOFF,BX12_34,2012 SEP 20 14:56:06
BTT396,LOGON,BT03_8,2012 SEP 20 15:03:08

textfile 2
Code:
BRM501,DEPLOYED
BRM502,DEPLOYED

to combine 2 textfile result together and create new file
result
Code:
BRM501,LOGON,BX12_28,2012 SEP 20 15:01:58,DEPLOYED
BRM502,LOGOFF,BX12_34,2012 SEP 20 14:56:06,DEPLOYED
BTT396,LOGON,BT03_8,2012 SEP 20 15:03:08, UNDEPLOYED

KShell
Hi guys I need a format or an approach to this problem i am facing to combine 2 log and generate a new result.. help is very much appreciated..
i have 100 of records in textfile 1 and 77 records in textfile 2. So I pretty much need to start with loops =(
i m looking for the solution that is if txtfile 1 have the record file found in txtfile 2.
new > result file will have txtfile1 with line + 'DEPLOYED'
else if record file is not found in txtfile 2 +'UNDEPLOYED'

---------- Post updated at 11:32 AM ---------- Previous update was at 10:51 AM ----------

solution found... thanks elixir_sinari
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

generate new string from a text file

Hi, I have a file and the content looks like this: line1 line2 File #5 : found '/u01/testing.txt' line5 line6 line7 File #12 : found '/u01/testabc.txt' line10 line11 I want to write a bash script to give me the output: The file 5 is '/u01/testing.txt' The file 12 is... (6 Replies)
Discussion started by: walterwaston
6 Replies

2. UNIX for Dummies Questions & Answers

Script to generate text file from excel file

Hello, I have a excel file which has almost ten columns on the shared drive. I have to write a shell script to ftp that daily to unix server and then extract some columns from there and generate oracle standard text file. The columns should be in proper order and aligned properly, otherwise... (1 Reply)
Discussion started by: isingh786
1 Replies

3. Shell Programming and Scripting

Generate a XML file from a text file

FILE-1 USER username@foo.com TOOLIN tool-a TOOL2 tool-b TOOL3 tool-c TOOL4 tool-d TOOL5 tool-e USER username_2@foo.com TOOLIN tool-e TOOL2 tool-f TOOL3 tool-c TOOL4 tool-d .... I need to take this file and generate a target XML file - <access> <managed> ... (3 Replies)
Discussion started by: jacki
3 Replies

4. Shell Programming and Scripting

generate a report

I am trying to generate a report for a file called phone_book awk -f {phone_book} why does this not work? Nothing happens at all. (2 Replies)
Discussion started by: gustave
2 Replies

5. UNIX for Dummies Questions & Answers

How to generate multiple lines in a text file?

Hello, I want to create a file whose content is multiple lines of strings. The string has the following pattern: aaaa/bbbb/A-B.txt A is a variable ranges from A1 to A2 B is a variable ranges from B1 to B2 Any ideas? Thanks. (17 Replies)
Discussion started by: vic005
17 Replies

6. Shell Programming and Scripting

generate tabular output from an input text file in unix shell scripting

Hi, I have the output (as below) which i want it to be in a table. For e.g. space utilization in PSE on path /logs is 0% space utilization in PSE on path /logs/tuxedo/tuxlsp is 16% space utilization in PSE on path /ldvarlsp/lsp/log is 37% space utilization in PSE on path /home is 6%... (7 Replies)
Discussion started by: pkbond
7 Replies

7. Shell Programming and Scripting

KSH - help needed for creating a script to generate xml file from text file

Dear Members, I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input. The contents of a single cell of INFO column is like: Area:app - aam Clean Up Criteria:... (0 Replies)
Discussion started by: Yoodit
0 Replies

8. Shell Programming and Scripting

a shell script to generate an excel sheet from a text file..

hi, i have a text file that looks like this! i want to generate an excel sheet out of it, removing all the junk data except the addresses that look like . Arrow Electrical Services Rotating Machinery, Electrical Contracting & Mining Specialists Onsite maintenance, breakdown... (8 Replies)
Discussion started by: vemkiran
8 Replies

9. Shell Programming and Scripting

Generate .csv file a text file

Hi guys, I have a text file that states: cat prod.hosts 11.29.130.14 host1 host1.test.com web17 11.29.130.15 host2 host2.test.com web18 11.29.130.16 host3 host3.test.com web19 I want a .csv file that states: ... (2 Replies)
Discussion started by: Junaid Subhani
2 Replies

10. Shell Programming and Scripting

Generate hexadecimal

Hello I'm working on a script to list all ipv6 from given address so I've run this script which create hex part of ipv6 STR2=159 END2=200 SUM2=`expr $END2 - $STR2` for ((i=STR2;i<=END2;++i)); do x=$( printf "%x" $i ) ; echo $x echo -e "::"$x >> netpart.txt done output is : ::9f... (2 Replies)
Discussion started by: nimafire
2 Replies
ddisna.f(3)							      LAPACK							       ddisna.f(3)

NAME
ddisna.f - SYNOPSIS
Functions/Subroutines subroutine ddisna (JOB, M, N, D, SEP, INFO) DDISNA Function/Subroutine Documentation subroutine ddisna (characterJOB, integerM, integerN, double precision, dimension( * )D, double precision, dimension( * )SEP, integerINFO) DDISNA Purpose: DDISNA computes the reciprocal condition numbers for the eigenvectors of a real symmetric or complex Hermitian matrix or for the left or right singular vectors of a general m-by-n matrix. The reciprocal condition number is the 'gap' between the corresponding eigenvalue or singular value and the nearest other one. The bound on the error, measured by angle in radians, in the I-th computed vector is given by DLAMCH( 'E' ) * ( ANORM / SEP( I ) ) where ANORM = 2-norm(A) = max( abs( D(j) ) ). SEP(I) is not allowed to be smaller than DLAMCH( 'E' )*ANORM in order to limit the size of the error bound. DDISNA may also be used to compute error bounds for eigenvectors of the generalized symmetric definite eigenproblem. Parameters: JOB JOB is CHARACTER*1 Specifies for which problem the reciprocal condition numbers should be computed: = 'E': the eigenvectors of a symmetric/Hermitian matrix; = 'L': the left singular vectors of a general matrix; = 'R': the right singular vectors of a general matrix. M M is INTEGER The number of rows of the matrix. M >= 0. N N is INTEGER If JOB = 'L' or 'R', the number of columns of the matrix, in which case N >= 0. Ignored if JOB = 'E'. D D is DOUBLE PRECISION array, dimension (M) if JOB = 'E' dimension (min(M,N)) if JOB = 'L' or 'R' The eigenvalues (if JOB = 'E') or singular values (if JOB = 'L' or 'R') of the matrix, in either increasing or decreasing order. If singular values, they must be non-negative. SEP SEP is DOUBLE PRECISION array, dimension (M) if JOB = 'E' dimension (min(M,N)) if JOB = 'L' or 'R' The reciprocal condition numbers of the vectors. INFO INFO is INTEGER = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value. Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: November 2011 Definition at line 118 of file ddisna.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.2 Tue Sep 25 2012 ddisna.f(3)
All times are GMT -4. The time now is 09:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy