Thanks for the reply!!!
Actually,we have to first find which records are having this issues and if the delimiter does not matches with specified delimiter then we have to check for the next line.
For example:
HTML Code:
Account Number,Name,Address,Comments
"123","XYZ","302 Street,Washington,US","NA"
"456","PQR"," 3233 Some Street,
Washington,US","is Defaulter"
"3434","sdsd","3233 Some Street,
Washington,US","Is not Defaulter"
"87856","sdsd","3233 Some Street,Washington,US","Is not Defaulter"
For this, we have develop the script as follows:
HTML Code:
cat file_name.txt| while read line
do
val_delimiter=`echo $line |awk -F"," '{ print NF }'`
if [ $val_delimiter -ne 3 ]
then
echo we have to take the next line and again check the value
fi
Is there any other simple way to find which reocrds are having 'new line character'
and if these records are having the 'new line character concate it with the next line
Again thanks for all the help!!
amey