10 More Discussions You Might Find Interesting
1. Programming
The file is similar to the attached.
Thousands of columns, delimiter is tab, with many columns containing free text and space separated.
I want to get the count of columns with non-empty entries.
eg.Col1=10, Col6=5, Col8=1
awk preferred (7 Replies)
Discussion started by: genehunter
7 Replies
2. Shell Programming and Scripting
Hi all,
I want to remove empty field in a text file. I tried to used sed. But it failed.
Input:
LG10_PM_map_19_LEnd 1000560 G AG AG
LG10_PM_map_19_LEnd 1005621 G AG
LG10_PM_map_19_LEnd 1011214 A AG AG
LG10_PM_map_19_LEnd 1011673 T CT CT ... (3 Replies)
Discussion started by: huiyee1
3 Replies
3. Shell Programming and Scripting
Hi ! programmers
I have a need of detecting empty field in file
my file looks like this
40.900|-71.600|1.6|20|1|1961|21.00|3.700||1|US|28035|10029370|31
40.900|-71.600|5.7|20|1|1961|21.00|3.700||1|US|28035|10029370|31
40.900|-71.600|7.8|20|1|1961|21.00|3.700||1|US|28035|10029370|31... (7 Replies)
Discussion started by: Dona Clara
7 Replies
4. Shell Programming and Scripting
I have below file
25-09-2012 24-09-2012 19-09-2012 31-07-2012 30-04-2012 30-03-2012
ASIAEXFVNV N/A CEU 4
DMIRSOA N/A CAS 2 2 2
DMIRSOA N/A MIDMT 2
NFIAL22 N/A HVNY 11 11 11
NFIAL22 N/A NYAL3 11 11 11
NFIAL22 N/A NYCN 11 11 11 ... (4 Replies)
Discussion started by: manas_ranjan
4 Replies
5. UNIX for Dummies Questions & Answers
Hi all !
I'm sure it is a basic question but I didn't find any threads that fit my need.
How to remove empty fields with awk?
Or in other words, how to shift all the fields after an empty field on the left?
input:
1|2||3|4|5||6
wanted:
1|2|3|4|5|6
I tried:
awk '{for(i=1; i<=NF;... (7 Replies)
Discussion started by: lucasvs
7 Replies
6. Shell Programming and Scripting
I have the test data with 10 column separated by comma and each column has more than 1000000 rows. Can anyone help me to find empty field in all columns and delete that empty field alone and lift that column up by one row.
Data with empty field:
A74203XYZ,A21718XYZ,A72011XYZ,A41095XYZ,... (7 Replies)
Discussion started by: zooby
7 Replies
7. Shell Programming and Scripting
Hello,
I will count words in a file (or more files) and count (if given up) empty files (test -z?), how can I do this? Like this:
There are "108" words in "3" files
There are "2" empty files
Thanks for your reaction.
Regards,
Arjan Engbers
(My English is not good, I hope you... (4 Replies)
Discussion started by: arjanengbers
4 Replies
8. Shell Programming and Scripting
Hi all,
I have this input file ..
BSS01 107 Swafieh 11/06/2008 12:06:57
BSS01 111 Ramada_Hotel 12/06/2008 11:37:20
BSS01 147 Kalha_Rep 11/06/2008 19:13:39
BSS01 147 Kalha_Rep ... (9 Replies)
Discussion started by: yahyaaa
9 Replies
9. Shell Programming and Scripting
Hi
I have a file which looks like this
name: Sally group: Group4
name: Tim group: Group1
name: Dan group: Group2
name: Chris group: Group3
name: Peter group:
name: Fred group:
name: Mary group: Group2
Well I want to get rid of the... (4 Replies)
Discussion started by: bombcan
4 Replies
10. UNIX for Dummies Questions & Answers
Deleted#### (1 Reply)
Discussion started by: tibbyuk
1 Replies