Sponsored Content
Top Forums Shell Programming and Scripting Converting txt file into CSV using awk or sed Post 302672037 by alister on Sunday 15th of July 2012 04:58:34 PM
Old 07-15-2012
Quote:
Originally Posted by ksk
Once I'm done with this, there is one last step, but it might be easier to explain in a separate thread or perhaps once I am to get this master CSV file.
It's never a good idea to withhold information. Better too much than too little. I've lost count of how many times I've seen someone ask for help on some very specific task, and then, later add another requirement which makes it clear that a completely different approach would have been simpler, more efficient and more maintainable. When that happens, it's a waste of time for everyone involved, both the member seeking help and the members offering help.

Whatever it is, I'm sure agama can handle it. Smilie

Regards,
Alister
These 2 Users Gave Thanks to alister For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

AWK CSV to TXT format, TXT file not in a correct column format

HI guys, I have created a script to read 1 column in a csv file and then place it in text file. However, when i checked out the text file, it is not in a column format... Example: CSV file contains name,age aa,11 bb,22 cc,33 After using awk to get first column TXT file... (1 Reply)
Discussion started by: mdap
1 Replies

2. Shell Programming and Scripting

converting xls file to txt file and xls to csv

I need to convert an excel file into a text file and an excel file into a CSV file.. any code to do that is appreciated thanks (6 Replies)
Discussion started by: bandar007
6 Replies

3. UNIX for Dummies Questions & Answers

Converting txt file to csv file

Hi, Using rsync, I've sent the output to a text file. This is the text file : Pls help me on converting this text file to a csv file. Probably a script or sth to convert the text file to a csv file. (3 Replies)
Discussion started by: anaigini45
3 Replies

4. Shell Programming and Scripting

Using awk/sed in handling csv file.

Please study the below script and the output Script: echo "Minimum ${host} ${process} response time=${min} ms" >> ${OUTDIR}/${OUTFILE}; echo "Maximum ${host} ${process} response time=${max} ms" >> ${OUTDIR}/${OUTFILE}; echo "Average ${host} ${process} response time=${avg} ms" >>... (0 Replies)
Discussion started by: ajincoep
0 Replies

5. Shell Programming and Scripting

Converting txt file in csv

HI All, I have a text file memory.txt which has following values. Average: 822387 7346605 89.93 288845 4176593 2044589 51883 2.47 7600 i want to convert this file in csv format and i am using following command to do it. sed s/_/\./g <... (3 Replies)
Discussion started by: mkashif
3 Replies

6. Shell Programming and Scripting

awk/sed/something else for csv file

Hi, I have a filename.csv in which there are 3 colums, ie: Name ; prefixnumber ; number root ; 020 ; 1234567 user1,2,3 ; 070 ; 7654321 What I want is to merge colum 2 and 3 that it becomes 0201234567 or even better +31201234567 so the country number is used and drop the leading 0.... (9 Replies)
Discussion started by: necron
9 Replies

7. Shell Programming and Scripting

Using csh / awk / sed to compare database sizes in a txt file

Hello, I have an output file showing database sizes across the 3 environments that I use (LIVE, TEST & DEVELOPMENT). I am trying to write a script that lets me know if the size of a db on one environment is different to its corresponding db on the other environments. Here is an example... (4 Replies)
Discussion started by: stevie_g
4 Replies

8. Shell Programming and Scripting

awk to print value from txt file to csv

Hi, I want to print two columns from a .txt file to a .csv file using awk. data in text file: Application -------------------------------------------------- ----------- OS Related Issues 1 EMEA Solutions ... (8 Replies)
Discussion started by: prashu_g
8 Replies

9. Shell Programming and Scripting

Using awk for converting xml to txt

Hi, I have a xml script, I converted it to .txt with values comma seperated using awk function. But I want the output values should be inside double quotes My xml script (Workorders.xml) is shown like below: <?xml version="1.0" encoding="utf-8" ?> <scbm-extract version="3.3">... (8 Replies)
Discussion started by: Viswanatheee55
8 Replies

10. Shell Programming and Scripting

Awk, sed, shell all words in INPUT.txt find in column1 of TABLE.txt and replce with column2 in

Hi dears i have text file like this: INPUT.txt 001_1_173 j nuh ]az 001_1_174 j ]esma. nuh ]/.xori . . . and have another text like this TABLE.txt j j nuh word1... (6 Replies)
Discussion started by: alii
6 Replies
SCATTER(3PVM)							  PVM Version 3.4						     SCATTER(3PVM)

NAME
pvm_scatter - Sends to each member of a group a section of an array from a specified member of the group. SYNOPSIS
C int info = pvm_scatter( void *result, void *data, int count, int datatype, int msgtag, char *group, int rootginst) Fortran call pvmfscatter(result, data, count, datatype, msgtag, group, rootginst, info) PARAMETERS
result Pointer to the starting address of an array of length count of datatype which will be overwritten by the message from the specified root member of the group. data On the root this is a pointer to the starting address of an array datatype of local values which are to be distributed to the mem- bers of the group. If n is the number of members in the group, then this array of datatype should be of length at least n*count. This argument is meaningful only on the root. count Integer specifying the number of elements of datatype to be sent to each member of the group from the root. datatype Integer specifying the type of the entries in the result and data arrays. (See below for defined types.) msgtag Integer message tag supplied by the user. msgtag should be >= 0. It allows the user's program to distinguish between different kinds of messages. group Character string group name of an existing group. rootginst Integer instance number of group member who performs the scatter of its array to the members of the group. info Integer status code returned by the routine. Values less than zero indicate an error. DESCRIPTION
pvm_scatter() performs a scatter of data from the specified root member of the group to each of the members of the group, including itself. All group members must call pvm_scatter(), each receives a portion of the data array from the root in their local result array. It is as if the root node sends to the ith member of the group count elements from its array data starting at offset i*count from the beginning of the data array. And, it is as if, each member of the group performs a corresponding receive of count values of datatype into its result array. The root task is identified by its instance number in the group. C and Fortran defined datatypes are: C datatypes FORTRAN datatypes ----------------------------------- PVM_BYTE BYTE1 PVM_SHORT INTEGER2 PVM_INT INTEGER4 PVM_FLOAT REAL4 PVM_CPLX COMPLEX8 PVM_DOUBLE REAL8 PVM_DCPLX COMPLEX16 PVM_LONG In using the scatter and gather routines, keep in mind that C stores multidimensional arrays in row order, typically starting with an ini- tial index of 0; whereas, Fortran stores arrays in column order, typically starting with an offset of 1. The current algorithm is very simple and robust. A future implementation may make more efficient use of the architecture to allow greater parallelism. EXAMPLES
C: info = pvm_scatter(&getmyrow, &matrix, 10, PVM_INT, msgtag, "workers", rootginst); Fortran: CALL PVMFSCATTER(GETMYCOLUMN, MATRIX, COUNT, INTEGER4, & MTAG, 'workers', ROOT, INFO) ERRORS
These error conditions can be returned by pvm_scatter PvmNoInst Calling task is not in the group PvmBadParam The datatype specified is not appropriate PvmSysErr Pvm system error SEE ALSO
pvm_bcast(3PVM), pvm_barrier(3PVM), pvm_psend(3PVM) 21 April, 1994 SCATTER(3PVM)
All times are GMT -4. The time now is 07:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy