#!/bin/bash
i=0
cat 1.csv | while read fileline
do
echo "$fileline"
IFS="#" flds=( $fileline )
nrofflds=${#flds[@]}
echo "noof fields$nrofflds"
fld=0
while [ "$fld" -lt "$nrofflds" ]
do
echo "noof counter$fld"
echo "$nrofflds"
#fld1="${flds[0]}" trying to store the content of line to fields but i am unable to do it.
for example the line look like this A#B#C#D#E#F
i want to A in one feild B in other and so on
echo "$col2"
fld=$(($fld+1))
done
i=$(($i+1))
echo "$i"
done
A#B#C#D#E#F#G#H
1#2#3#4#5#6#7#8
Z#x#c#V
7#2#8#9
N.
I want to read the file line by line and store in rowarray.
then the rowarray content should be spilt or made to fields using the delimeter #.
i am not sure can we store the fields in to column array.then it may be loaded to database.
then these fields are to be loaded to a oracle database.
may be in awk.provide the code if possible.