10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the following a.txt file
A|1|2|3|4|5|
A||2|3|0||
A|1|6||8|10|
A|9|2|3|4|1|
A|0|9|3|4|5|
A||2|3|4|5|
A|0|av|.9|4|9|
I use the following command to count null values for 2nd field
awk -F"|" '!$2 { N++; next } END {print N}' a.txt
It should give the result 2, but it is giving... (2 Replies)
Discussion started by: RJG
2 Replies
2. Shell Programming and Scripting
Hi,
I have a csv file with given details
abc.txt
123,ra,point,,there
232,ba,points,home,pheer
I want to get those values and store them in different variables:
Code:
while read line
do
echo $line |awk -F"," '{print $1" "$2" "$3" "$4" "$5"}'|read dbt_acct val_dt crncy AMT... (11 Replies)
Discussion started by: rahulsk
11 Replies
3. Shell Programming and Scripting
I am trying to replace the partcular columns(Col3,col5,col20,col44,col55,co56,col59,col60,col61,col62,col74,col75,col88,col90,col91,col93,col94,col95) with empty
Input file
Col1,col2,col3,col4,col5------,col100
1,2,3,4,5,---------,100
3,4,5,6,7,---------,300
Output : ... (3 Replies)
Discussion started by: onesuri
3 Replies
4. Shell Programming and Scripting
Hi,
i have another issue:
i have three files:
FILE 1
ServiceEventHandler,
Processed,Percentage
5285337,100%
FILE 2
Wallet,
Processed,Percentage
5285337,100% (1 Reply)
Discussion started by: reignangel2003
1 Replies
5. Shell Programming and Scripting
I am using below code to validate the source file,code working fine but if any column contains null value then below code throwing error actually it should not.how to customize the below code to handle null null values also.
When I run the script with below source data getting “date error”, as... (2 Replies)
Discussion started by: srivalli
2 Replies
6. Shell Programming and Scripting
Hi,
I've a pipe delimited file and wanted to replace the 3rd field to 099990 where the values are null. How can I achieve it using awk or sed.
20130516|00000061|02210|111554|03710|2|205069|SM APPL $80-100 RTL|S
20130516|00000061|02210|111554|03710|2|205069|SM APPL $80-100 RTL|S... (12 Replies)
Discussion started by: rudoraj
12 Replies
7. Shell Programming and Scripting
Hi, I have the following data:
2860377|"DATA1"|"DATA2"|"65343"|"DATA2"|"DATA4"|"11"|"DATA5"|"DATA6"|"65343"|"DATA7"|"0"|"8"|"1"|"NEGATIVE"
32340377|"DATA1"|"DATA2"|"65343"|"DATA2"|"DATA4"|"11"|"DATA5"|"DATA6"|"65343"|"DATA7"|"0"|"8"|"1"|"NEG-DID"... (3 Replies)
Discussion started by: sdohn
3 Replies
8. Shell Programming and Scripting
Hi ,
I have below input file
1.order number is useful.
2.vendor_id is produced.
3.the vandor name is "malawar".
I want output file like
1. order number is useful.
2. vendor_id is produced.
3. the vandor name is VmalawarV.
in input file line number 1.order number there is no... (4 Replies)
Discussion started by: vinothsekark
4 Replies
9. Shell Programming and Scripting
I have a file with contents
"08011"||20080812
"23348"|20080827|20080924
"23387"|20080829|20080915
"23581"|20081003|20081028
"23748"|20081017|20090114
"24095"|20080919|20081013
"24105"|20070723|20070801
"24118"|20080806|20081013
"24165"|20080820|20080912
"24221"|20080908|20080929
i... (3 Replies)
Discussion started by: sonam273
3 Replies
10. Shell Programming and Scripting
Hi this is my first time posting ever. I'm relatively new in using AWK/SED, I've been trying many a solution. I'm trying to replace the 59th column in a file where if I encounter '' then I would like to replace it with the word NULL.
example
0 , '' , '' , 0 , 195.538462
change it to
0... (5 Replies)
Discussion started by: gumal901
5 Replies