Sponsored Content
Top Forums Shell Programming and Scripting Extract comma separated value in unix Post 302561755 by clx on Wednesday 5th of October 2011 06:41:11 AM
Old 10-05-2011
Code:
$ result=val1,val2
$ OLDIFS=$IFS
$ IFS=","
$ set -- $result 
$ echo $1
val1
$ echo $2
val2
$ IFS=$OLDIFS
$

This User Gave Thanks to clx For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unix shell script to parse the contents of comma-separated file

Dear All, I have a comma-separated file. 1. The first line of the file(header) should have 4 commas(5 fields). 2. The last line of the file should have 1 comma(2 fields). Pls help me in checking this condition in a shell script. And the number of lines between the first line and last... (11 Replies)
Discussion started by: KrishnaSaran
11 Replies

2. UNIX Desktop Questions & Answers

Unix Comma Separated to Excel Column

I would like to copy 2 parts of a csv file from Unix to an XL sheet. However to save time I do not want to format the column ever time I cut and paste into XL(Text2Column). I've used awk -F, '{Print $1, $2....}'. Is there a script or code that can automatically format the csv for XL columns? ... (3 Replies)
Discussion started by: ravzter
3 Replies

3. Shell Programming and Scripting

Comma separated file

Hi all, I have the following files types: FileA: 100, 23, 33, FileB: 22, 45, 78, and i want to make File C: 100,22 23,45 33,78 any nice suggestions for making it easy. (3 Replies)
Discussion started by: hen1610
3 Replies

4. Shell Programming and Scripting

Need Help - comma inside double quote in comma separated csv,

Hello there, I have a comma separated csv , and all the text field is wrapped by double quote. Issue is some text field contain comma as well inside double quote. so it is difficult to process. Input in the csv file is , 1,234,"abc,12,gh","GH234TY",34 I need output like below,... (8 Replies)
Discussion started by: Uttam Maji
8 Replies

5. UNIX for Dummies Questions & Answers

[solved] Comma separated values to space separated

Hi, I have a large number of files which are written as csv (comma-separated values). Does anyone know of simple sed/awk command do achieve this? Thanks! ---------- Post updated at 10:59 AM ---------- Previous update was at 10:54 AM ---------- Guess I asked this too soon. Found the... (0 Replies)
Discussion started by: lost.identity
0 Replies

6. Shell Programming and Scripting

Need comma separated output

Hi, I am having the file with server names & its corresponding process, i need your help how to convert into comma separated output between server & app #cat apps.txt Server1 oracle was Server2 http webadmin Server3 tsm db2 My requirement is like below. Server1,oracle/was... (5 Replies)
Discussion started by: ksgnathan
5 Replies

7. Shell Programming and Scripting

awk to parse comma separated field and removing comma in between number and double quotes

Hi Experts, Please support I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6. ... (3 Replies)
Discussion started by: as7951
3 Replies

8. Shell Programming and Scripting

Parsing Comma Separated values to UNIX variable from PLSQL

Hi All, I'm trying to pass the comma separated values (string) returned from Plsql Procedure to UNIX variable. getting the below log message cat: -: Bad file descriptor awk: cmd. line:1: fatal: error reading input file `-': Bad file descriptor The output coming from plsql procedure is... (3 Replies)
Discussion started by: Mahesh3089
3 Replies

9. UNIX for Beginners Questions & Answers

How to extract fields from a CSV i.e comma separated where some of the fields having comma as value?

can anyone help me!!!! How to I parse the CSV file file name : abc.csv (csv file) The above file containing data like abv,sfs,,hju,',',jkk wff,fst,,rgr,',',rgr ere,edf,erg,',',rgr,rgr I have a requirement like i have to extract different field and assign them into different... (4 Replies)
Discussion started by: J.Jena
4 Replies
DWARF_ADD_FDE_INST(3)					   BSD Library Functions Manual 				     DWARF_ADD_FDE_INST(3)

NAME
dwarf_add_fde_inst -- add a call frame instruction to a DWARF frame descriptor LIBRARY
DWARF Access Library (libdwarf, -ldwarf) SYNOPSIS
#include <libdwarf.h> Dwarf_P_Fde dwarf_add_fde_inst(Dwarf_P_Fde fde, Dwarf_Small op, Dwarf_Unsigned val1, Dwarf_Unsigned val2, Dwarf_Error *err); DESCRIPTION
Function dwarf_add_fde_inst() adds a call frame instruction to the DWARF frame descriptor referenced by argument fde. Argument fde should reference a frame descriptor allocated using dwarf_new_fde(3). Argument op specifies the operator for the frame instruction. The DWARF standard defines the set of legal values for this argument. Argument val1 specifies the first operand of the frame instruction. Argument val2 specifies the second operand of the frame instruction. If argument err is not NULL, it will be used to store error information in case of an error. RETURN VALUES
On success, function dwarf_add_fde_inst() returns the frame descriptor given in argument fde. In case of an error, function dwarf_add_fde_inst() returns DW_DLV_BADADDR and sets the argument err. ERRORS
Function dwarf_add_fde_inst() can fail with: [DW_DLE_ARGUMENT] Argument fde was NULL. [DW_DLE_FRAME_INSTR_EXEC_ERROR] The frame instruction operator specified in argument op was invalid. [DW_DLE_MEMORY] An out of memory condition was encountered during the execution of the function. SEE ALSO
dwarf(3), dwarf_add_frame_fde(3), dwarf_add_frame_fde_b(3), dwarf_add_frame_cie(3), dwarf_fde_cfa_offset(3), dwarf_new_fde(3) The DWARF Debugging Information Format, Version 4, http://www.dwarfstd.org/. BSD
September 26, 2011 BSD
All times are GMT -4. The time now is 09:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy