Sponsored Content
Top Forums Shell Programming and Scripting Passing data from csv to script Post 302450622 by ladyAnne on Friday 3rd of September 2010 09:27:30 AM
Old 09-03-2010
Passing data from csv to script

Hi

I have a bash script as such:

Code:
cat $csvdir/$csvfile | csvdsx -ePlanned \
-iCell:CELLID \
-cCells%BTS:SITEID^Cell:CELLID \
-sCell:CELLID \
--multi-value-field=$paramname \ 
-xCELLID,SITEID \
->$dsxdir/$dsxfile

It basically converts a csv file to a dsx file

My csv file looks like this:

Code:
 
SITEID,CELLID,Measurement Frequencies - Active
1067,1067A,58
1067,1067A,59
1067,1067A,60
1067,1067A,61
1067,1067B,58
1067,1067B,59
1067,1067B,60
1067,1067B,61
1067,1067C,58
1067,1067C,59
1067,1067C,60
1067,1067C,61

I want to pass "Measurement Frequencies - Active" from the csv file to the parameter $paramname in the script.
Can anyone help me
So whatever is in the csv file must get passed to the script
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script to format a .CSV data

Hi There I needed to write a Unix shell script which will pick up the data from a .CSV file and reformat it as per the requirement and write it to another .CSV file. Currently I am in the proess of Data Import to "Remedy System" (A one kind of incident mangement Application) and this... (8 Replies)
Discussion started by: Uday1982
8 Replies

2. Shell Programming and Scripting

Passing data from file to variables for script

Hello all! After searching through numerous helpful posts on these forums I am still having an issue with a task I am trying to accomplish. I am trying to take data from an input file, store the contents as variables, and use the variables in the script. The input file (input.txt) is... (2 Replies)
Discussion started by: screwed718
2 Replies

3. Web Development

script to load data from csv file

hello i want a script to load the data line by line from a csv file into a mysql table (3 Replies)
Discussion started by: srpa01red
3 Replies

4. UNIX for Advanced & Expert Users

shell script to format .CSV data

Hi all, I have written a shell script to search a specified directory (e.g. /home/user) for a list of specific words (shown as ${TMPDIR}/wordlist below). The script works well enough, but I was wondering if there was a way to display the line number that the word is found on? Thanks! cat... (1 Reply)
Discussion started by: tmcmurtr
1 Replies

5. UNIX for Dummies Questions & Answers

Shell script to extract data from csv file

Hi Guys, I am new to shell script.I need your help to write a shell script. I need to write a shell script to extract data from a .csv file where columns are ',' separated. The file has 7 columns having values say column 1,column 2.....column 7 as below along with their values. Name, Address,... (7 Replies)
Discussion started by: Vivekit82
7 Replies

6. Shell Programming and Scripting

Shell script to extract data from csv file

Hi everyone, I have a csv file which has data with different heading and column names as below. Static Data Ingested ,,,,,,,,,,,,Known Explained Rejections Column_1,column_2,Column_3,Column_4,,Column_6,Column_7,,% Column_8,,Column_9 ,Column_10 ,... (14 Replies)
Discussion started by: Vivekit82
14 Replies

7. Shell Programming and Scripting

Shell script for .Txt to .csv conversion with data processing

Hi experts, I want to convert a txt file having rows and columns (CNAI_DUMP_raw.txt) by comparing it with another text file (paramaters.txt) and generate a output in CSV which contains only 3rd column from CNAI_DUMP_raw.txt, and the columns mentioned in parameters.txt. FYI: There are two... (16 Replies)
Discussion started by: Gautam Banerjee
16 Replies

8. Shell Programming and Scripting

Script to ingest a csv, validate data and insert into Oracle

Hi all i would appreciate your help... I am looking for a set of unix commands which i can use to 1) ingest a csv file with a known format 2) validate the filename 3) validate the data/datatypes 4) Insert into an oracle db Can you help get me started? yogz888 (1 Reply)
Discussion started by: yogz888
1 Replies

9. Shell Programming and Scripting

Script to Gather data from logs and export to a CSV file

Greetings, After a few hours of trial and error, I decide to ask for some help. I am new to AWK and shell script, so please don't laugh :p I made the below script, to gather data from some logs and have the output into a CSV file : #!/bin/sh #Script to collect Errors ... (9 Replies)
Discussion started by: Yagami_Sama
9 Replies

10. Shell Programming and Scripting

Need a script to parse data and output to csv

I am not too savvy with arrays and am assuming that what I am looking for needs arrays. This is my requirement. So I have the raw data that gets updated to a log as shown below StudentInfo: FullInfo = { Address = Newark Age = 20 Name= John } StudentInfo:... (2 Replies)
Discussion started by: sidnow
2 Replies
snmp_variables(4)						   File Formats 						 snmp_variables(4)

NAME
snmp_variables - format of specifying variable names to SNMP tools SYNOPSIS
system.sysdescr.0 DESCRIPTION
Variable names for SNMP are in the format of Object Identifiers (ASN.1). There are several methods of representation. Each variable name is given in the format of A.B.C.D...., where A, B, C, and D are subidentifiers in one of two forms of notation. Each subidentifier can be encoded as a decimal integer or a symbol as found in the RFC 1066 MIB. The case of the symbols is not significant. If there is no leading period (.) in the variable name, the name will be formed as if having been preceded with iso.org.dod.internet.mgmt.mib. . A period must be placed before the first variable if the user is to fully specify the name. For example: 1.1.0 system.sysDescr.0 1.sysDescr.0 ...all refer to the same variable name. Likewise: .1.3.6.1.2.1.1.1.0 .iso.org.dod.internet.mgmt.mib.system.sysdescr.0 .1.3.6.1.2.1.1.sysdescr.0 ...all refer to the same variable name. The description of the variables in the MIB is given in the set of MIB files defined by the MIBS environment variable (or the default list defined at compilation time) and the MIB files in the /etc/sma/snmp/mibs directory (or the MIBDIRS environment variable). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |External | +-----------------------------+-----------------------------+ SEE ALSO
snmpd.conf(4), attributes(5), sma_snmp(5) RFC 1065, RFC 1066, RFC 1067, ISO IS 8824 (ASN.1) SunOS 5.10 16 Jan 2004 snmp_variables(4)
All times are GMT -4. The time now is 03:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy