How to extract multiple data based on character position. I need to fetch from 7-9 and 22-26 and there is no delimiter for 22-26 since it is part of the column. The file may have more than 1000 character long.I managed to pull any one but not both
for example
test data
12345 zxc vbnmlk jgfdsaqwertyu 678 ......
23456 qwe rttyui opasdgmlkmsls 790 ......
cmd
cut -c 22-26 testfile.txt
or
cut -c 7-9 testfile.txt