Re: Previously-functional gawk script now failing to execute - PLEASE HELP!!!
On 2021-09-15 15:11, Bryan VanSchouwen via Cygwin wrote: I just tried executing an old, previously-functional awk script using a version of gawk that I had downloaded last year, and a command of the following format (as recommended in a previous communication with the Cygwin mailing list): gawk -vRS="\r\n" -f data_collect_e_-_FF_4-state.awk but this time, the script failed to execute!! Upon closer examination, the script appears to be failing after successfully reading the first line of data from the input data file, even though the input file has NOT been modified since it was last used. (I should point out that while the files were copied over from my old computer, another awk script execution that I had attempted recently with older files worked fine!) So the script is not failing to execute, it is successfully reading the first line: so how is it failing, and what has that to do with the input file being modified, and if the input file has not been modified since the script was last used, why are you rerunning it? Package gawk has been updated once a year for the last 4 years, up until 2020-04, and has not changed recently, so the problem may be with your data file, or the script, or your Cygwin installation, and only you can really answer that, as they have been "copied" from another computer: using what process? How was Cygwin setup on the new computer, and which version of gawk was installed to be used? -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in binary units and prefixes, physical quantities in SI.] -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Re: Previously-functional gawk script now failing to execute - PLEASE HELP!!!
On 9/15/21, Bryan VanSchouwen via Cygwin wrote: > Hello. > > I just tried executing an old, previously-functional awk script using a > version of gawk that I had downloaded last year, and a command of the > following format (as recommended in a previous communication with the > Cygwin mailing list): > gawk -vRS="\r\n" -f data_collect_e_-_FF_4-state.awk > but this time, the script failed to execute!! The data file you attached doesn't have "\r\n" line endings: $ file rpcg_FF_filtrd.txt rpcg_FF_filtrd.txt: ASCII text compare with one that does: $ file test.txt test.txt: ASCII text, with CRLF line terminators <.. snip ..> > What the heck is going on with this software, and is there a way to fix > it?! I don't use RS and start my awk scripts off with sub("\r$", "", $0) # fix any \r\n line endings so my scripts work with either flavor of line endings. If you don't want to change your script try changing your input unix2dos Regards, Lee -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Previously-functional gawk script now failing to execute - PLEASE HELP!!!
Hello. I just tried executing an old, previously-functional awk script using a version of gawk that I had downloaded last year, and a command of the following format (as recommended in a previous communication with the Cygwin mailing list): gawk -vRS="\r\n" -f data_collect_e_-_FF_4-state.awk but this time, the script failed to execute!! Upon closer examination, the script appears to be failing after successfully reading the first line of data from the input data file, even though the input file has NOT been modified since it was last used. (I should point out that while the files were copied over from my old computer, another awk script execution that I had attempted recently with older files worked fine!) (For reference, I have attached copies of the script and input files.) What the heck is going on with this software, and is there a way to fix it?! 224 0.595851431 0.09369783 225 0.889062608 0.033480286 226 0.835640914 0.024667245 228 0.926425963 0.100830335 229 1.647598528 0.053075286 230 1.342667163 0.049740591 231 1.23487811 0.303661798 232 0.918372444 0.201229278 233 1.073620187 0.038863171 234 1.282736478 0.092083566 237 1.198194998 0.061451225 238 1.517388582 0.183405758 239 0.777250185 0.042951855 240 1.442106405 0.071534566 242 1.127683833 0.180393161 243 0.75826546 0.10362625 244 0.806582369 0.053810549 245 0.782472863 0.089712654 246 0.7665594 0.063004719 247 1.133027476 0.116433654 248 0.228653463 0.054674445 250 1.03832007 0.057555951 251 0.207643515 0.045497989 252 0.89097942 0.065711892 253 1.382205043 0.041019712 254 1.624161735 0.097996896 255 0.102011133 0.017824426 257 0.243916847 0.030898216 258 1.401842211 0.167043419 259 1.367403732 0.089365097 260 1.011543148 0.241393784 261 0.331122492 0.084430871 262 1.247481409 0.012064997 263 0.164144595 0.015874666 264 0.29124209 0.023159954 265 1.155980147 0.007664518 267 1.327231572 0.088667225 269 1.630417096 0.091432252 272 0.837876582 0.088357396 276 0.126347248 0.021352854 278 0.281248041 0.04460507 279 1.507370692 0.055864662 280 0.099307529 0.023337928 282 0.078283134 0.015679097 285 1.396978738 0.041014414 286 1.639489181 0.021233884 287 1.358795349 0.166693354 290 1.034468946 0.071941536 291 1.042912979 0.161347016 292 1.243638613 0.186114384 294 1.465291389 0.080129079 295 1.498983157 0.261019123 297 1.020960822 0.039127181 298 1.014076358 0.055905146 299 0.10474365 0.025701761 300 1.164509327 0.06490821 301 1.581053193 0.117554464 302 1.198070393 0.279390802 304 1.030638676 0.098787267 306 1.892887325 0.148397402 307 1.180718504 0.269259715 308 1.250687158 0.220505404 309 1.389652687 0.061317639 310 1.071337559 0.071155291 311 0.655741784 0.083834781 312 0.757954775 0.06606795 315 1.861485087 0.302438971 316 1.543650517 0.131453064 317 0.590790541 0.17252546 318 1.360237347 0.017090096 319 0.092471202 0.03160355 322 0.160293668 0.018528699 323 1.498177719 0.063140897 324 1.33747325 0.077138118 325 1.135054625 0.14033561 326 0.106286087 0.010054509 327 0.172350731 0.062090642 332 1.599736857 0.07364121 333 0.719466407 0.104815196 334 0.95050495 0.042289463 335 0.950136142 0.102065088 337 0.930073299 0.164582827 338 0.931813131 0.083700864 339 0.797003512 0.019929439 340 0.948011214 0.025551098 341 1.158923159 0.115968704 342 1.151928768 0.090588751 343 1.558238511 0.070125811 345 1.78478822 0.203931487 346 1.184805052 0.015907815 347 0.918694163 0.016359047 348 0.334625526 0.081083201 349 1.330240541 0.108204132 350 1.23117168 0.128820577 353 0.822391221 0.060853522 354 0.84578441 0.133596858 data_collect_e_-_FF_4-state.awk Description: Binary data 224 0.509749968 0.177160603 225 0.558302662 0.133600275 226 0.691840552 0.051067741 227 1.233597604 0.283456681 228 0.421856797 0.148593149 229 0.718569048 0.172281526 230 0.873414173 0.141360943 232 0.814583694 0.116116109 233 0.545530204 0.10546754 234 0.99700609 0.169893273 237 1.147039778 0.248435675 238 1.212524735 0.136625425 239 0.815957312 0.154361412 240 1.002183096 0.097622672 242 0.685532137 0.195614404 243 0.690542903 0.177536237 244 1.067802596 0.299976054 245 0.611368407 0.087569393 246 1.294782866 0.320160689 247 1.355992615 0.162978753 249 0.992940868 0.202092716 250 0.837372727 0.104691616 251 0.545193505 0.129523309 252 0.751120079 0.141558128 258 1.596453745 0.293675409 259 0.790301838 0.126762602 260 0.968986106 0.098652785 261 0.842054028 0.073642471 262 1.152477734 0.101408622 265 1.139992142 0.098671518 266 1.338325639 0.216312478 267 1.463659157 0.236418172 268 0.927751272 0.123255266 270 0.86399925 0.138745433 272 0.520219938 0.170853123 278 0.704652944 0.09522493 279 1.890656381 0.499643642 280 0.398963117 0.118476991 284 0.122517329 0.049364492 285 1.134970966 0.106429413 286 1.176698565 0.201348106 287 1.07703454 0.157882271 288 0.969053608 0.147946755 290 0.634496025 0.186587724 291 0.990315215 0.116076617 294 1.315796916 0.222188321 295 1.241466428 0.161521586 296 1.060798921 0.087565525 297 1.331018926 0.110648457 298 1.213718667 0.335101144 300 1.0742
Re: Previously-functional gawk script now failing to execute - PLEASE HELP!!!
On 9/15/2021 5:11 PM, Bryan VanSchouwen via Cygwin wrote: Hello. I just tried executing an old, previously-functional awk script using a version of gawk that I had downloaded last year, and a command of the following format (as recommended in a previous communication with the Cygwin mailing list): gawk -vRS="\r\n" -f data_collect_e_-_FF_4-state.awk but this time, the script failed to execute!! Upon closer examination, the script appears to be failing after successfully reading the first line of data from the input data file, even though the input file has NOT been modified since it was last used. (I should point out that while the files were copied over from my old computer, another awk script execution that I had attempted recently with older files worked fine!) Ignoring the shouting :-) ... That command line assumes that the program will see \r\n at the end of each line of input. That is indeed the usual line ending on Windows. However! Since it is not the usual line ending on Posix (what Cygwin aims to be like), there are various options/flags that can affect an internal translation that effectively changes \r\n to \n, or something like that. Others will be able to supply the details more readily than I, but I would look at the environment variable and startup options to Cygwin around this point and see where that leads you. Regards - Eliot Moss -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Re: Previously-functional gawk script now failing to execute - PLEASE HELP!!!
On Wed, Sep 15, 2021 at 3:11 PM Bryan VanSchouwen wrote: WHAT THE HECK IS GOING ON WITH THIS SOFTWARE?! > I don't know what the technical problem is, but I would politely point out: 1. Typing things in all caps is considered shouting 2. Shouting at the people who might be able to help you is probably not the best way to get help (to put it mildly) 3. Remember that the people who might be able to help you do so on a volunteer basis (also, see #2 above) You may be frustrated, but you're not doing yourself any favors by being rude. Bill -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
Previously-functional gawk script now failing to execute - PLEASE HELP!!!
Hello. I just tried executing an old, previously-functional awk script using a version of gawk that I had downloaded last year, and a command of the following format (as recommended in a previous communication with the Cygwin mailing list): gawk -vRS="\r\n" -f data_collect_e_-_FF_4-state.awk but this time, the script failed to execute!! Upon closer examination, the script appears to be failing after successfully reading the first line of data from the input data file, even though the input file has NOT been modified since it was last used. (I should point out that while the files were copied over from my old computer, another awk script execution that I had attempted recently with older files worked fine!) WHAT THE HECK IS GOING ON WITH THIS SOFTWARE?! -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation:https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple