10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hi group,
Can you please tell how to delete specific columns from a file.
I know something like
awk -F, '{ print $1" "$2" "15 }' input.txt > output.txt will delete all other columns. But this is in a way to copy some particular columns.
But is there any other way to select just some... (11 Replies)
Discussion started by: smitra
11 Replies
3. UNIX for Advanced & Expert Users
Hi All,
i have a .Csv file in the below format
startTime, endTime, delta, gName, rName, rNumber, m2239max, m2239min, m2239avg, m100016509avg, m100019240max, metric3min, m100019240avg, propValues
11-Mar-2012 00:00:00, 11-Mar-2012 00:05:00, 300.0, vma3550a, a-1_CPU Index<1>, 200237463, 0.0,... (9 Replies)
Discussion started by: mahi_mayu069
9 Replies
4. Shell Programming and Scripting
Hello,
I have a file filled with dates, such as:
04-08-2011 message
04-08-2011 message
03-08-2011 message
01-08-2011 message
31-07-2011 message
24-07-2011 message
15-07-2011 message
13-12-2008 message
26-11-2007 message
And I want to delete those lines whose date is older than 10... (5 Replies)
Discussion started by: asanchez
5 Replies
5. Shell Programming and Scripting
Hello, I have a file like:
26-07-2011 sunz02 message1
26-07-2011 sunz02 message2
26-07-2011 sunz02 message3
15-07-2011 sunz02 message1
15-07-2011 sunz02 message2
15-07-2011 sunz02 message3... (5 Replies)
Discussion started by: asanchez
5 Replies
6. Shell Programming and Scripting
Hello, I have a file like this one:
03-07-2011 sunz02 message1
03-07-2011 sunz02 message2
03-07-2011 sunz02 message3
01-07-2011 sunz02 message1
01-07-2011 sunz02 message2
01-07-2011 sunz02 ... (1 Reply)
Discussion started by: asanchez
1 Replies
7. Shell Programming and Scripting
I want to delete all lines from a file (orig_file) that contain the regex values (bad_inv_list)
I tried a for each loop with sed but it isn't working
for file in `cat bad_inv_list`;
do
sed '/$file/d' orig_file > pared_down_file.1
mv pared_down_file.1 orig_file
done
I've added... (2 Replies)
Discussion started by: verge
2 Replies
8. Shell Programming and Scripting
Dear specialists out there, please help a poor awk newbie:
I have a very huge file to process consisting of 300000 columns and 1500 rows. About 20000 columns shall be deleted from that file. So it is clear, that I can't do this by writing down all the columns in an awk command like $1, $x etc.... (5 Replies)
Discussion started by: flxms
5 Replies
9. Shell Programming and Scripting
Hi All,
Am working on perl script which should delete columns in existing CSV file.
If my file is :
AA,BB,CC,DD
00,11,22,33
00,55,66,77
00,99,88,21
AA,BB... are all my headers can come in any order (e.g AA,CC,BB...) and rest are values. I want to delete column CC...
Can anybody help... (2 Replies)
Discussion started by: darshakraut
2 Replies
10. Shell Programming and Scripting
I have a file which has some lines starting with a particular word. I would like to delete 5 lines before each such line containing that particular word.
eg:
line1
line2
line3
line4
line5
line6
"particular word"...
I would like to delete line2-line6 and all such occurences in that... (4 Replies)
Discussion started by: ramu_1980
4 Replies