Showing an extra record/line


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory Showing an extra record/line
# 1  
Old 05-04-2006
Question Showing an extra record/line

Hello everybody,

I am working on ETL side. My job is to load the data from Oracle table to flat file and from flat file to oracle table using ETL tool Informatica. My flat files are fixed width. In the first phase, it is loading 66351 records into data file through tool. When I checked through wc -l <data filename> it is giving 66352. I attached a QC file to check the source count. In that file it is giving correct count as 66351. When I loaded the data from this data file to table, only 66351 records are loaded. Not 66352 records. I am confused why it is giving an extra line in the file with WC command but it contains exactly the same number of rows in source. Please send all possibilities with solution as I am new to this.

Thanks and regards,
Srivsn
# 2  
Old 05-06-2006
Is there an End-of-line character (/n) on the end of the last row?
Code:
# echo "two
lines" > /tmp/2lines
# echo "two
lines
" > /tmp/not2lines
# wc -l /tmp/{not,}2lines
2 2lines
3 not2lines
5 total

Cheers
ZB
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reject the record if the record in the next line does not begin with 2.

Hi, I have a input file with the following entries: 1one 2two 3three 1four 2five 3six 1seven 1eight 1nine 2ten 2eleven 2twelve 1thirteen 2fourteen The output should be: (5 Replies)
Discussion started by: supchand
5 Replies

2. Shell Programming and Scripting

Reject the record if the record in the next line does not satisfy the pattern

Hi, I have a input file with the following entries: 1one 2two 3three 1four 2five 3six 1seven 1eight 1nine 2ten The output should be 1one 2two 3three 1four 2five 3six (2 Replies)
Discussion started by: supchand
2 Replies

3. UNIX for Dummies Questions & Answers

Removing extra new line characters

Hello, I have a text file that looks like: ABC123|some text|some more text|00001 00002 0003 0004 000019|000003|Item I have searched and found an example to remove the extra new line characters using grep and sed, but it (I think) assumes the lines start with a number and the... (5 Replies)
Discussion started by: c56444
5 Replies

4. Shell Programming and Scripting

how to delete extra character in a line?

And I want to delete the characters longer than 20 for each line start with #. The other lines should remain the same. I think this can be done by sed. Could anyone help me with this? Thanks! my input file: #ZP_05494889.1_Clostridium_papyrosolvens... (3 Replies)
Discussion started by: ritacc
3 Replies

5. Shell Programming and Scripting

Sed or Grep to delete line containing patter plus extra line

I'm new to using sed and grep commands, but have found them extremely useful. However I am having a hard time figuring this one out: Delete every line containing the word CEN and the next line as well. ie. test.txt blue 324 CEN green red blue 324 CEN green red blue to produce:... (2 Replies)
Discussion started by: rocketman88
2 Replies

6. Shell Programming and Scripting

'sed' command shows extra line

Here is an interesting problem that I am seeing when using 'sed'. The goal is to print out the names of the Oracle SID's on a system and here is the command I am using: ps -ef|grep ora|grep pmon|awk '{print $NF}'|sed 's/ora_pmon_//' The output of the command after the awk is this: ... (3 Replies)
Discussion started by: soleil4716
3 Replies

7. Filesystems, Disks and Memory

vxdisk list output showing extra LUNs

hi fren i am facing this problem i have sun 6140 storage 30 volumes bt my vxdisk list output is showing 37 disk which shd nt b there has neone faced this proble earlier vxdiks list output is like this SUN6140-2_0 auto - - online c4t201700A0B84853C0d2s2 SUN6140-2_1 auto - - online... (13 Replies)
Discussion started by: bond_ankur
13 Replies

8. Shell Programming and Scripting

Remove extra spaces in a line

Hi, I need a help in deleting extra spaces in a text. I have a huge file, a part of it is :- 3 09/21/08 03:32:07 started undef mino Oracle nmx004.wwdc.numonyx.com Message Text : The Oracle session with the PID 1103 has a CPU time ... (6 Replies)
Discussion started by: vikas027
6 Replies

9. UNIX for Dummies Questions & Answers

help to replace extra new line characters

Hi my file data is like below ramu,sony,"raju \n ravi \n ramya" \n ravi,sarah,"sowmya \n sorry s\ sangam" \n i want replace new line characters in between double coats with sinhle space. for example cat input_file ramu,sony,"raju ravi ramya" ravi,sarah,"sowmya sorry sangam" ... (3 Replies)
Discussion started by: Raghava
3 Replies

10. Shell Programming and Scripting

Showing extra line/record in file

Hello everybody, My job is to load the data from Oracle table to flat file and from flat file to oracle table using ETL tool Informatica. My flat files are fixed width. In the first phase, it is loading 66351 records into data file through tool. When I checked through wc -l <data filename> it is... (1 Reply)
Discussion started by: srivsn
1 Replies
Login or Register to Ask a Question