10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I want to delete row in csv file , which row value from 2009-10-01 to 2011-06-03 using script.my csv row data look like:
2009-10-01
2011-03-30
2011-03-31
2011-04-01
2011-06-03
2011-06-30
2011-07-01
2011-09-28 ... (7 Replies)
Discussion started by: rakibul639
7 Replies
2. Shell Programming and Scripting
Hi, I have a long file in the format below. I want to delete the consecutive lines that contain the same value in column 1.
I have tried awk '!x++' FS="," filename
This has not worked.
14,MM709_BHP_DM,BHP,BHP_MC709_DM
19,OFFLINE,CHE,CHEV_MC773_DM
20,M33,BP,BP_MIM775_NS_DM ... (2 Replies)
Discussion started by: ndnkyd
2 Replies
3. Shell Programming and Scripting
Hi,
My input file is this way
1.1 0.0 2.4 3.5
7.9 1.8 22.3 4.7 8.9
0.9 1.3 0.0 3.4 5.6
0.0 1.1 2.2 0.0 0.0
1.1 0.0 0.0 3.4 5.6
I would like to delete the entire row, if either of 2nd and 3rd columns are 0.0.
Please note that my values are all decimal values.
So, my output would... (4 Replies)
Discussion started by: jacobs.smith
4 Replies
4. Shell Programming and Scripting
Hi,
I want to delete rows that have 0 at column 4.
The file looks like this:
chr01 13 61 2
chr01 65 153 0
chr01 157 309 1
chr01 313 309 0
chr01 317 469 1
chr01 473 557 0
I want to delete all rows with a 0 at column 4
chr01 13 61 2
chr01 157 309 1
chr01 ... (3 Replies)
Discussion started by: kylle345
3 Replies
5. Shell Programming and Scripting
Hi i have a data like
hw:dsfnsmdf:39843 chr2 76219829 51M atatata 51 872389
hw:dsfnsmdf:39853 chr2 76219839 51M65T atatata 51 872389
hw:dsfnsmdf:39863 chr2 76219849 51M atatata 51 872389
hw:dsfnsmdf:39873 chr2 ... (3 Replies)
Discussion started by: bhargavpbk88
3 Replies
6. Shell Programming and Scripting
Hello,
am I new to awk, and I am tryint to:
INPUT FILE:
"73423555","73423556","73423557","73423558","73423559"
OUTPUT FILE:
73423555
73423556
73423557
73423558
73423559
My useless code so far:
#!/bin/awk -F ','
BEGIN
{
i=0;
} (8 Replies)
Discussion started by: drbiloukos
8 Replies
7. Shell Programming and Scripting
Hi,
I have a csv file with old data..i need to have only last 30 days from the current dateof data in the file.The fourth field in the file is a date field.i need to write a script to delete the old data by comparing the the fourth field with the (current date -30).I need to delete the rows in... (2 Replies)
Discussion started by: pals70423
2 Replies
8. Shell Programming and Scripting
Hi ,
I've a perl script to convert .xls to .csv .After conversion I want to delete first 28 and the last row from .csv file.Is there any efficent way to achive this both together.
I'm deleting first 28 rows by using folllowing my perl code:
exec " tail -n+28 infile.csv > outfile.csv
... (7 Replies)
Discussion started by: ajaypatil_am
7 Replies
9. Shell Programming and Scripting
Hi All,
I am having following file and I want to delete 1 row last column.
Current File Content:
================
procedure test421 put_line
procedure test321 test421
procedure test521 test321
procedure test621 test521
Expected File Content:
===========================
procedure... (3 Replies)
Discussion started by: susau_79
3 Replies
10. UNIX for Dummies Questions & Answers
I have a csv file, which is > 2 Gigs. I need to BCP that file to Sybase db , but I cant upload that b'caz first row of the file is failing. ( having some errors probably.) I can manually insert the first line into db & then I can upload the rest of the data in file, if i can delete the first row.
... (2 Replies)
Discussion started by: kedar.mehta
2 Replies