I have a file with text inside of it like so:
471_068 0
AALIAN 1
ASHLEY-U 95
CATRIONA_W 97
STESSY K 08
This data is related to an items "Name" and it's "Color ID"
I need to split the Name from the ID and house them in separate variables.
As a note, the ID when using a digit under 10 can both have a leading 0 or not, so I need to parse those as they appear (a 04 will need to stay 04 and a 1 will need to remain 1 not 4 or 01)
The Names can have an underscore(_), hyphen(-) or space ( ) in them which would need to be preserved as well.
Here is what I have for reading the file, which reads the file line by line in the loop which is great but I can't figure out how to get the variables I want separated correctly.
while read fLine
do
PRDT=$(echo $fLine | tr '\t' '\n')
echo First Var is ${PRDT[0]} - Second Var is ${PRDT[1]}
done < Products