Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 209 Posts 100 Joined 2008-08-01 02:53 18-year member UID 122532 Gender Male
Status Offline
Brother HAT, I'm really a newbie, but I'm trying to learn. Do you have to make fun of newbies like this? At least I've learned a lot in terms of P processing. Anyway, I should thank you all. The line break in the "print max" part makes it not display. Because I want to put the mark somewhere else.
Credits 9,023 Posts 5,017 Joined 2007-05-31 19:39 19-year member UID 89899 Gender Male
Status Offline
This, I have no intention of laughing at anyone, and I caused unnecessary misunderstandings. Sorry.
What I mean is that the moderator has answered very clearly, asking you to change your_file to your own file name. It is suggested to look back at the moderator's answer.
//print max I can't display it after changing lines. Because I want to put the mark elsewhere
I'm very stupid and don't understand what it means. Can you post the modified code you have to take a look?
Credits 209 Posts 100 Joined 2008-08-01 02:53 18-year member UID 122532 Gender Male
Status Offline
gawk "{for (i=1;i<=NF;i++) { if($i~/^5-/){ split($i,a,/-/); if(a>max) max=a; }}} END{print max}" "a.txt"
@echo %NewFile% %ste% %sty% %max% I want to display many variables together
[ Last edited by dragonamd on 2008-9-17 at 12:43 AM ]