Trying to learn AWK at work, where to compile my code? via /r/learnprogramming


Trying to learn AWK at work, where to compile my code?

I am trying to learn AWK at work and I have to use an online compiler (http://ift.tt/2t7F1ih). Where do I write the code to compile it? For example:

awk -v city=Berlin 'BEGIN{printf "city = %s \n", name}' 

I am trying to output on screen "city = Berlin" I tried in main.awk then "sh main.awk", did not work. Then in the command line I wrote but it did not work, also "echo | -f main.awk" still did not work. How can I run the code on the site?

Submitted July 17, 2017 at 09:47AM by thoniw
via reddit http://ift.tt/2urMkoG

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s