AWK syntax problem.
I am writing to write a AWK command line to take a line from a file (X.dat) and transfer it to another document (Y.dat) based the number in column 5, I am using a loop to separate the lines and use the variable in my condition. The code looks like this: for j in 3.0 4.0 5.0 6.0 6.5 7.0 8.0 9.0 do awk "$5==${j} {print $0}" X.dat >Y.dat. The error message is: awk: =='3.0' {print} awk: ^ syntax error awk: =='4.0' {print} awk: ^ syntax error awk: =='5.0' {print} awk: ^ syntax error awk: =='6.0' {print} awk: ^ syntax error awk: =='6.5' {print} awk: ^ syntax error awk: =='7.0' {print} awk: ^ syntax error awk: =='8.0' {print} awk: ^ syntax error awk: =='9.0' {print} awk: ^ syntax error
Issue fixed. It was a matter of global and local variables. The fixed code was the following: for j in 3.0 4.0 5.0 6.0 6.5 7.0 8.0 9.0 do awk "\$5==${j} {print $0}" X.dat >Y.dat.
If your still need help tag someone. If you already solved your question(which is great :) ) then make sure you close this post :)
@NvidiaIntely I know, but I just wrote the fix and went home from work. So I left it open if people had things to add. ;)
Good then!
experienced in CUDA due to your username or more gaming related? :)
Yeah, lol. I am a techie!
Heh, just very few I see these days that actually take advantage of gpu acceleration, at least when it still comes to molecular dynamics.
Yeah xD
Are you working in the Frostbite engine or gaming related due to your username?
To be honest I got no clue why I went with it.
oh, lol. You play Star Wars Battlefront EA?
Nope. Not really a big gamer these days due to me being busy with my master thesis... So my gaming rack is just gathering dust :S
Oh, that's not good :( Well I actually know alot about building PC's. I started a channel: http://yttechy.cf/ but not much stuff on it yet lol
That is nice. So I guess you're PC is custom build? :)
Yes.
It does not have an Nvida GPU yet because I could not afford it yet. AMD RX 480 GPU.
Want specs list?
Sure. :)
Expensive stuff indeed. Almost got the same in mine, GPU however is the GTX 980 TI
Yeah very much $$$ Also want to check my site and check 1 video maybe? http://yttechy.cf/ I am sure my video will shock you.
wish I could smugle my university computer home :P
Specs of it?
I will surely take a look tomorrow. :D
Well if you dk the specs, why you want it lol?
4x GTX-Titan-X 8x Core i7 6700K This is the PC I do simulations on GPU accelerated molecular dynamics on.
WOW!!
Who would not like that lol.
Check my video?
Watching the videos as we speak.
oh lol. Can you guess my age?
Difficult actually guessing. 16-17 maybe?
Nope, 13.
And you?
23. :P
Oh :P
I have some interesting videos coming out next month so you wanna subscribe xD?
But it looks good. Got some good stuff going, keep it up. The biggest issue with this is just the money :)
Yeah, but I already got some computer companies emailing me about free products they will send me lol, so maybe not.........
The RX 480 I am getting is free xD
That is really good. I was gonna say if you get some sponsors then this could become big fast. So nice especially for your age! :)
my first grant I first got this year.
But it was also a huge one.
What was huge?
My grant proposal I sent to Nvidia and the scientific council where I live. I requested the computer I told you about.
oh okay. Also OriginPC is my one and only sponsor right now lol.
I gtg now, hope to talk again! cya later!
Have a good evening, and I will differently talk to you again now that I follow your channel.
Thanks lol! Maybe through email or youtube next time! cya!
Join our real-time social learning platform and learn together with your friends!