01-26-2010
Well, I was using the example you posted. I haven't really changed anything except for the file that it reads.
The script outputs
Host:
Date:
Status:
which is good, I just want to know how to avoid printing the entries that say expired in the status field.
Edit: I figured out why it wasn't catching the "expired" entries. It was because of quotes already being in the CSV, so I had to add an extra set in and escape the inside quotes.
How can I output the entries in CSV format?
Last edited by dzl; 01-26-2010 at 01:55 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a CSV file which contains number series as one of the fields. Some of the records of the field look like :
079661/3
I have to convert the above series as
079661
079662
079663
and store it as 3 different records.
Looking for help on how to achieve this. Am a newbie at Shell... (10 Replies)
Discussion started by: mihirk
10 Replies
2. Shell Programming and Scripting
I am trying to parse a csv file in the below 'name-value pair' format and then use the values corresponding to the name.
Type:G,Instance:instance1,FunctionalID:funcid,Env:dev,AppName:appname... (6 Replies)
Discussion started by: chiru_h
6 Replies
3. Shell Programming and Scripting
I have a CSV file that needs to through two seperate processes (in the end there will be 2 files (Dload.unl and Tload.unl and we'll say the input file name is mass.csv). I have a processfile() function that will call the process Dload funtion. In Dload I want to read mass.csv into Dload and then... (1 Reply)
Discussion started by: dolo21taf
1 Replies
4. Shell Programming and Scripting
I have been trying to find a good solution for this seemingly simple task for 2 days, and I'm giving up and posting a thread. I hope someone can help me out!
I'm on HPUX, using sqlplus, mailx, awk, have some other tools available, but can't install stuff that isn't already in place (without a... (6 Replies)
Discussion started by: soldstatic
6 Replies
5. Shell Programming and Scripting
Yes, there is a great doc out there that discusses parsing csv files with sed, and this topic has been covered before but not enough to answer my question (unix.com forums).
I'm trying to parse a CSV file that has optional quotes like the following:
"Apple","Apples, are fun",3.60,4.4,"I... (3 Replies)
Discussion started by: analog999
3 Replies
6. Shell Programming and Scripting
Hello list,
I am working on a csv file which contains two fields per record which contain IP addresses. What I am trying to do is find records which have identical fields(IP addresses) which occur 4(four) times, and if they do, delete all records with that specific identical field(ip address).
... (4 Replies)
Discussion started by: landossa
4 Replies
7. Shell Programming and Scripting
Hi Members, I am stuck with the following problem. Request your kind help
I have an csv file which contains, 1 header record, data records and 1 footer record. Sample is as below
Contents of cm_update_file_101010.csv
--------------------------------------------------
... (6 Replies)
Discussion started by: ramakanth_burra
6 Replies
8. Shell Programming and Scripting
Hi,
Newbie here and I need some help to parse a csv file that contains fields separated by ",". What I need to achieve here is, read the 1 line file and extract 240 fields and pass to a variable and then read the next 240 fields and pass to a variable, over and over. If anyone can assist that... (4 Replies)
Discussion started by: tmslixx
4 Replies
9. Shell Programming and Scripting
Hi,
I have basic knowledge on unix shell scripting(not an expert).
My requirement is reading the csv file using the schema defined in the configuration file and if the condition is not mached then move the unmatched record to a error file and matched good records into other file.
In brief: ... (43 Replies)
Discussion started by: shree11
43 Replies
10. Shell Programming and Scripting
Hello All,
I have an input CSV file like below, where first row data can be in different position after every run of the tool, i.e. pzTest in below example is in column 1, but it can be also in 3 column and same for all the headers in the first row.
pzTest, pzExtract, pxUpdate, pzInfo... (1 Reply)
Discussion started by: asirohi
1 Replies
LEARN ABOUT DEBIAN
slags2.f
slags2.f(3) LAPACK slags2.f(3)
NAME
slags2.f -
SYNOPSIS
Functions/Subroutines
subroutine slags2 (UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV, SNV, CSQ, SNQ)
SLAGS2
Function/Subroutine Documentation
subroutine slags2 (logicalUPPER, realA1, realA2, realA3, realB1, realB2, realB3, realCSU, realSNU, realCSV, realSNV, realCSQ, realSNQ)
SLAGS2
Purpose:
SLAGS2 computes 2-by-2 orthogonal matrices U, V and Q, such
that if ( UPPER ) then
U**T *A*Q = U**T *( A1 A2 )*Q = ( x 0 )
( 0 A3 ) ( x x )
and
V**T*B*Q = V**T *( B1 B2 )*Q = ( x 0 )
( 0 B3 ) ( x x )
or if ( .NOT.UPPER ) then
U**T *A*Q = U**T *( A1 0 )*Q = ( x x )
( A2 A3 ) ( 0 x )
and
V**T*B*Q = V**T*( B1 0 )*Q = ( x x )
( B2 B3 ) ( 0 x )
The rows of the transformed A and B are parallel, where
U = ( CSU SNU ), V = ( CSV SNV ), Q = ( CSQ SNQ )
( -SNU CSU ) ( -SNV CSV ) ( -SNQ CSQ )
Z**T denotes the transpose of Z.
Parameters:
UPPER
UPPER is LOGICAL
= .TRUE.: the input matrices A and B are upper triangular.
= .FALSE.: the input matrices A and B are lower triangular.
A1
A1 is REAL
A2
A2 is REAL
A3
A3 is REAL
On entry, A1, A2 and A3 are elements of the input 2-by-2
upper (lower) triangular matrix A.
B1
B1 is REAL
B2
B2 is REAL
B3
B3 is REAL
On entry, B1, B2 and B3 are elements of the input 2-by-2
upper (lower) triangular matrix B.
CSU
CSU is REAL
SNU
SNU is REAL
The desired orthogonal matrix U.
CSV
CSV is REAL
SNV
SNV is REAL
The desired orthogonal matrix V.
CSQ
CSQ is REAL
SNQ
SNQ is REAL
The desired orthogonal matrix Q.
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
November 2011
Definition at line 152 of file slags2.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.1 Sun May 26 2013 slags2.f(3)