Sponsored Content
Full Discussion: Script to create a CSV file
Top Forums Shell Programming and Scripting Script to create a CSV file Post 302819353 by asnatlas on Monday 10th of June 2013 04:15:06 PM
Old 06-10-2013
I double checked and this is a part of the output file:

Code:
SERVER1
RC_Script_1	0:off   1:off   2:off   3:on    4:off   5:off   6:off

----------------------------------------------------------------------------------
SERVER2
RC_Script_1	0:off   1:off   2:off   3:on    4:off   5:off   6:off

----------------------------------------------------------------------------------
SERVER3
RC_Script_1	0:off   1:off   2:off   3:on    4:off   5:off   6:off

----------------------------------------------------------------------------------
SERVER4
RC_Script_1	0:off   1:off   2:on    3:on    4:off   5:on    6:off
RC_Script_2	0:off   1:off   2:on    3:on    4:off   5:on    6:off

----------------------------------------------------------------------------------
SERVER5
RC_Script_1	0:off   1:off   2:on    3:on    4:off   5:on    6:off
RC_Script_2	0:off   1:off   2:on    3:on    4:off   5:on    6:off

----------------------------------------------------------------------------------
SERVER6
RC_Script_1	0:off   1:off   2:off   3:on    4:off   5:off   6:off

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

Would it be easier if I had the server name on each line ?

EX:
Code:
SERVER1	RC_Script_1	0:off   1:off   2:off   3:on    4:off   5:off   6:off

----------------------------------------------------------------------------------
SERVER2	RC_Script_1	0:off   1:off   2:off   3:on    4:off   5:off   6:off

----------------------------------------------------------------------------------
SERVER3	RC_Script_1	0:off   1:off   2:off   3:on    4:off   5:off   6:off

----------------------------------------------------------------------------------
SERVER4	RC_Script_1	0:off   1:off   2:on    3:on    4:off   5:on    6:off
SERVER4	RC_Script_2	0:off   1:off   2:on    3:on    4:off   5:on    6:off

----------------------------------------------------------------------------------
SERVER5	RC_Script_1	0:off   1:off   2:on    3:on    4:off   5:on    6:off
SERVER5	RC_Script_2	0:off   1:off   2:on    3:on    4:off   5:on    6:off

----------------------------------------------------------------------------------
SERVER6	RC_Script_1	0:off   1:off   2:off   3:on    4:off   5:off   6:off

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


Last edited by asnatlas; 06-10-2013 at 05:21 PM..
 

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
SCRIPT-EMAIL(8) 					  System Administration Commands					   SCRIPT-EMAIL(8)

NAME
script-email - Amanda script to send email notifications DESCRIPTION
script-email is an Amanda script implementing the Script API. It should not be run by users directly. It sends a notification email to the addresses specified in the MAILTO property. PROPERTIES
This section lists the properties that control script-email's functionality. See amanda-scripts(7) for information on the Script API, script configuration. MAILTO List of email addresses that will receive an email on command execution. It is a multi-valued property: property "MAILTO" "amanda@domain.com" "sysadmin@domain.com" "amandauser@domain.com" EXAMPLE
In this example, script-email is scheduled to be run before the DLE, on the server. The unqualified email address amanda will be passed to the email system unchanged. The script is then attached to a dumptype, which can then be specified for any DLEs which require notification. define script-tool pre-email { comment "email me before this DLE is backed up" plugin "script-email" execute-on pre-dle-backup execute-where server property "mailto" "amanda" } define dumptype user-tar-email { user-tar script "pre-email" } SEE ALSO
amanda(8), amanda.conf(5), amanda-client.conf(5), amanda-scripts(7) The Amanda Wiki: : http://wiki.zmanda.com/ AUTHORS
Jean-Louis Martineau <martineau@zmanda.com> Zmanda, Inc. (http://www.zmanda.com) Dustin J. Mitchell <dustin@zmanda.com> Zmanda, Inc. (http://www.zmanda.com) Amanda 3.3.3 01/10/2013 SCRIPT-EMAIL(8)
All times are GMT -4. The time now is 01:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy