I am having a list of ids (total 2 lakh), I want to write a shell script to split the ids (string and integer) using shell script . Example given below :
IDlist.txt
:
| LT345 |
| R567 |
| LT9 |
| MRTD002 |
| MK53 |
| RR567 |
I have extracted the ids from IDlist.txt with the following script.
awk '{print $2}' IDlist.txt > newId_list.txt
newId_list.txt
:
LT345
R567
LT9
MRTD002
MK53
RR567
How can I split the newId_list.txt ids as given below ?
result_string.txt
:
LT
R
LT
MRTD
MK
RR
result_integer.txt
:
345
567
9
002
53
567