Hi,
How do I parse/split lines (strings) read from a file and display the individual tokens in a shell script? Given that the length of individual lines is not constant and number of tokens in each line is also not constant.
The input file could be as below:
one~two~three~four~five~six
11~12~13~14~15
AAA~BBB~CC~DD~EEEE~FFF~GGGGG
Output should be :
Line 1
one
two
three
four
five
six
Line 2
11
12
13
14
15
Line 3
AAA
BBB
CC
DD
EEEE
FF
GGGGG
Your help/hints are highly appreciated.
Thank you,
Ajay