10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
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
2. Shell Programming and Scripting
Using the file below, which will always have the first indicated by the digit after the -
and last id in it, indicated by the digit after the -, I am trying to use awk
to print the missing line or lines in file following the pattern of the previous line.
For example, in the file below the next... (4 Replies)
Discussion started by: cmccabe
4 Replies
3. Shell Programming and Scripting
I have 2 for loop in my program , first one will list files based on timestamp and second one list the files based on type(RPT / SUB_RPT).Here is my code:
#!/bin/ksh
STG_DIR=/home/stg
for pattern in `find $STG_DIR -type f -name 'IBC*csv' | awk -F'' '{print $(NF-1)}' | sort -u`
do
echo... (2 Replies)
Discussion started by: ann15
2 Replies
4. Shell Programming and Scripting
Hello experts!
I have 2 files.
file1 is a list file containing uniquely names. e.g.:
name1 number number
name2 number number
name5 number number
name10 number number
...
file2 is a data file arbitrary containing the names of file1 in paragraphs separated by "10" e.g.
name4 ... (3 Replies)
Discussion started by: phaethon
3 Replies
5. Shell Programming and Scripting
Hi, please help with this, I need to insert missing values into a matrix for a regression analysis.
I have made up an example. The first three columns are variables with levels and the next 3 are values, the 4th column missing values should be replaced by 0s, and 5th and 6th column missing... (3 Replies)
Discussion started by: ritakadm
3 Replies
6. Shell Programming and Scripting
Hi,
I have a csv file with content like:
1,0,100
1,1,150
2,0,200
2,1,250
3,0,300
3,1,350
I want an output such that all numbers in 3rd col where 2nd col is "0" come in the same col in the output. The same goes for numbers where 2nd col is "1".
1 100 150
2 200 250
3 300 350
Tnx... (2 Replies)
Discussion started by: jamaje
2 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
I have two (2) sets of files that are based on some snapshots of database that I want to merge and insert any missing sequential number.
Below are example representation of these files:
file1:
DATE TIME COL1 COL2 COL3 COL4 ID
01/10/2013 0800 100 ... (3 Replies)
Discussion started by: newbie_01
3 Replies
8. Shell Programming and Scripting
Hi Friends,
I have come across some files where some of the columns don not have data.
Key, Data1,Data2,Data3,Data4,Data5
A,5,6,,10,,
A,3,4,,3,,
B,1,,4,5,,
B,2,,3,4,,
If we see the above data on Data5 column do not have any row got filled. So remove only that column(Here Data5) and... (4 Replies)
Discussion started by: ks_reddy
4 Replies
9. Shell Programming and Scripting
sample file (comma as field separators)
MessageFlow,1,BusIntBatchMgr,a
OOBEvent,1,BusIntBatchMgr,a
TaskEvents,1,,a
MTTrace,1,,a
MTWarning,,1,a
MessageFlow,1,Batch,a
OOBEvent,1,Batch,a
TaskEvents,1,,a
EAISAPIdocWizard,1,BusIntMgr,a
EAISAPBAPIWizard,1,BusIntMgr,a... (3 Replies)
Discussion started by: vrclm
3 Replies
10. Shell Programming and Scripting
Hi Fellows,
I have been struggling to fix an issue in csv records to compose sql statements and have been really losing sleep over it. Here is the problem:
I have csv files in the following pipe-delimited format:
Column1|Column2|Column3|Column4|NEWLINE
Address Type|some descriptive... (4 Replies)
Discussion started by: khayal
4 Replies