Hi,
I have a file containing many records delimited by pipe (|).
Each record should contain 17 columnns/fields. there are some fields having fields less than 17.So i am extracting those records to a file using the below command
Then i am concatenating all lines in feedfilebadrecs.txt to one single line.
but its not working. The concatenation is not happening.I have tried concatenating with other commands like paste,sed , awk etc. but not working(giving some random line as output from the input file)
I applied these commands for concatenating on some other manually created files and its working .
I am not able to understand why concatenation is not happening on dynamically created file using awk.
Please help me to figure this out..
Thank You
I have a file containing many records delimited by pipe (|).
Each record should contain 17 columnns/fields. there are some fields having fields less than 17.So i am extracting those records to a file using the below command
Code:
awk 'BEGIN {FS="|"} NF !=17 {print}' feedfile.txt >feedfilebadrecs.txt
Code:
tr -d '\n' < feedfilebadrecs.txt
I applied these commands for concatenating on some other manually created files and its working .
I am not able to understand why concatenation is not happening on dynamically created file using awk.
Please help me to figure this out..
Thank You