Sponsored Content
Full Discussion: Script to create a CSV file
Top Forums Shell Programming and Scripting Script to create a CSV file Post 302810335 by asnatlas on Tuesday 21st of May 2013 03:52:48 PM
Old 05-21-2013
Script to create a CSV file

I created a script that will go out and so a "/sbin/chkconfig --list | egrep XXX" against a server list that would create an output file like the following example:

Code:
----------------------------------------------------------------------------------
SERVER1
RC_Script_1      0:off   1:off   2:off   3:on    4:off   5:off   6:off
RC_Script_2      0:off   1:off   2:off   3:on    4:off   5:off   6:off
Connection to SERVER1 closed.

----------------------------------------------------------------------------------
SERVER2
RC_Script_1      0:off   1:off   2:off   3:on    4:off   5:off   6:off
Connection to SERVER2 closed.

----------------------------------------------------------------------------------

I would like to create a CSV file so that when I open it I would have something like:

SERVER1, RC_Script_1, etc
SERVER2, RC_Script_1, etc

One problem is a server might have no RC Script(s), Three, or more...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to create csv file using shell script

I have a file in multiple directory which has some records in the following format File: a/latest.txt , b/latest.txt, c/latest.txt -> Name=Jhon Age=27 Gender=M Street=LA Road Occupation=Service I want to generate a csv file from the above file as follows File: output.csv -> ... (9 Replies)
Discussion started by: rjk2504
9 Replies

2. Shell Programming and Scripting

Help to create script which reade values from csv

I have a csv file :-my csv file has say 10 columns eg:- A,1,2,3,4,5,6,7,8,9 B,1,2,3,5,6,7,8,9 c,1,2,6,7,8,9 ----------------- I have to create a flat file from this file .The condition is each columns has fixed lenght declared: say length of column 1 = 1 length of column 2 =3 ... (1 Reply)
Discussion started by: Sanal
1 Replies

3. Shell Programming and Scripting

ksh script to create a generic csv file from different source formats

Hi all, I have a requirement to create a "superset" file out of a number of different sources with some different and some same columns. We intend to have a manually updateable SuperSetCols.csv which would look like "ColA","ColB","ColC","ColD","ColE","ColF","ColG" so someday we may add... (3 Replies)
Discussion started by: Leedor
3 Replies

4. Shell Programming and Scripting

Create an .csv/excel file using shellscript

In my file, i have 4 Product names(For ex:Microsoft excel, Oracle,.Net,IBM websphere,..etc.,) I want this 4 Products in 4 individual .csv/excel file after running the script with those products related information. (12 Replies)
Discussion started by: Navya
12 Replies

5. Shell Programming and Scripting

How to create multiline csv cell through shell script?

Hi, I have a text like the one given below status="Observation 1" read1="Source rows not load" read2="Score drop" I want to create a csv and mail it out in such a way that all three lines will be in a single cell but as three lines. For ex Col C1 ... (3 Replies)
Discussion started by: prasperl
3 Replies

6. Shell Programming and Scripting

Need help. How to create csv file?

Hi I'm a beginner and I have some problem. I have multiple files in the same directory which has one column but rows following the format. File: directory/Disk.txt Content: a b c d e File: directory/Memory.txt a b c d e File: directory/CPU.txt (3 Replies)
Discussion started by: thenuie
3 Replies

7. UNIX for Dummies Questions & Answers

How to Create excel file(.csv) using shell script?

Hi, i have shell script which compiles n number of test cases and execute them one by one. i want to create report in excel through script in which two columns namely "test id" and "release".second column have two subcolumns namely compiles and excutes. so i want first column should display test... (15 Replies)
Discussion started by: RamMore123
15 Replies

8. Shell Programming and Scripting

Compare 2 files of csv file and match column data and create a new csv file of them

Hi, I am newbie in shell script. I need your help to solve my problem. Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file. File1: SourceFile,DateTimeOriginal /home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies

9. Shell Programming and Scripting

Create csv from text file

Gents, I am trying to create a csv file using the file attached. I have a problem to get all information required because the rows are not continues. Here is my code till now. awk ' /"ffid"/{if(s){print s;s=$NF}else{s=$NF}} /"LineNumber"/{s=s $NF} /"PointNumber"/{s=s $NF}... (4 Replies)
Discussion started by: jiam912
4 Replies

10. UNIX for Beginners Questions & Answers

awk and sed script to create one output CSV file

Hi All , I would require your help to generate one output file after post processing of one CSV file as stated below This file is just a small cut from a big file . Big file is having 20000 lines PATTERN,pat0,pat1,pat2,pat3,pat4,pat5,pat6,pat7,pat8,pat9... (2 Replies)
Discussion started by: kshitij
2 Replies
Connection Management(3)					 globus rls client					  Connection Management(3)

NAME
Connection Management - Defines #define GLOBUS_RLS_URL_SCHEME 'rls' #define GLOBUS_RLS_URL_SCHEME_NOAUTH 'rlsn' #define GLOBUS_RLS_SERVER_DEFPORT 39281 #define MAXERRMSG 1024 Functions void globus_rls_client_certificate (char *certfile, char *keyfile) void globus_rls_client_proxy_certificate (char *proxy) globus_result_t globus_rls_client_connect (char *url, globus_rls_handle_t **h) globus_result_t globus_rls_client_close (globus_rls_handle_t *h) int globus_rls_client_get_timeout () void globus_rls_client_set_timeout (int seconds) Detailed Description Functions to open and close connections to an RLS server. Define Documentation #define GLOBUS_RLS_URL_SCHEME 'rls' URL scheme to use when connecting to RLS server. #define GLOBUS_RLS_URL_SCHEME_NOAUTH 'rlsn' URL scheme when connecting to RLS server without authentication. #define GLOBUS_RLS_SERVER_DEFPORT 39281 Default port number that RLS server listens on. #define MAXERRMSG 1024 Maximum length of error messages returned by server. Function Documentation void globus_rls_client_certificate (char *certfile, char *keyfile) Set certificate used in authentication. Sets environment variables X509_USER_CERT, X509_USER_KEY, and clears X509_USER_PROXY. Parameters: certfile Name of X509 certificate file. keyfile Name of X509 key file. void globus_rls_client_proxy_certificate (char *proxy) Set X509_USER_PROXY environment variable to specified file. Parameters: proxy Name of X509 proxy certificate file. If NULL clears X509_USER_PROXY. globus_result_t globus_rls_client_connect (char *url, globus_rls_handle_t **h) Open connection to RLS server. Parameters: url URL of server to connect to. URL scheme should be RLS or RLSN, eg RLS://my.host. If the URL scheme is RLSN then no authentication is performed (the RLS server must be started with authentication disabled as well, this option is primarily intended for testing). h If the connection is successful *h will be set to the connection handle. This handle is required by all other functions in the API. Return values: GLOBUS_SUCCESS Handle h now connected to RLS server identified by url. globus_result_t globus_rls_client_close (globus_rls_handle_t *h) Close connection to RLS server. Parameters: h Connection handle to be closed, previously allocated by globus_rls_client_connect(). Return values: GLOBUS_SUCCESS Connection closed, h is no longer valid. int globus_rls_client_get_timeout () Get timeout for IO calls to RLS server. If 0 IO calls do not timeout. The default is 30 seconds. Return values: timeout Seconds to wait before timing out an IO operation. void globus_rls_client_set_timeout (intseconds) Set timeout for IO calls to RLS server. Parameters: seconds Seconds to wait before timing out an IO operation. If 0 IO calls do not timeout. The default is 30 seconds. Author Generated automatically by Doxygen for globus rls client from the source code. Version 5.2 Wed Jan 25 2012 Connection Management(3)
All times are GMT -4. The time now is 08:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy