Eikonal Blog

2011.09.30

awk

Filed under: scripting, unix — Tags: , — sandokan65 @ 11:03

Passing shell variables to AWK

Thing that works well for me:

    awk '{print "'"$VARIABLE"'"}' 1 > 2
    

Related here: Scripting languages – https://eikonal.wordpress.com/2010/06/15/awk-sed/ | Unix tricks – https://eikonal.wordpress.com/2011/02/15/unix-tricks/ | SED tricks – https://eikonal.wordpress.com/2010/10/05/sed-tricks/ | Memory of things disappearing > nmap stuff > getports.awk – https://eikonal.wordpress.com/2010/06/23/memory-of-things-disappearing-nmap-stuff-getports-awk/

4 Comments »

  1. […] awk […]

    Like

    Pingback by Scripting languages « Eikonal Blog — 2011.09.30 @ 12:46

  2. […] awk […]

    Like

    Pingback by Unix tricks « Eikonal Blog — 2011.09.30 @ 12:47

  3. […] awk […]

    Like

    Pingback by sed tricks « Eikonal Blog — 2011.09.30 @ 12:48

  4. […] if (in_port) state = $2; } /^Aname / { if (in_port) service = $2; } Related here: AWK – https://eikonal.wordpress.com/2011/09/30/awk/ Share this:StumbleUponDiggRedditLike this:LikeBe the first to like this post. Comments […]

    Like

    Pingback by Memory of things disappearing > nmap stuff > getports.awk « Eikonal Blog — 2011.09.30 @ 12:49


RSS feed for comments on this post. TrackBack URI

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

Blog at WordPress.com.

%d bloggers like this: