I want to extract data between two characters. For example if the input is abc efg hig - 99.4% (16337276 kB) used then I want to extract 99.4 from it. So please provide me any suggestions about it.
I want to extract data between two characters. For example if the input is abc efg hig - 99.4% (16337276 kB) used then I want to extract 99.4 from it. So please provide me any suggestions about it.
cut -d'-' -f2 < myfile | cut -d'%' -f1 --- This command is used to extract between two characters. Also, GNU edition of awk, i.e. gawk, which is on many Linux distros, supports many field separators. This should solve your problem.
Thanks a lot for your reply. This command really works for me.
Bookmarks