Category Non-word Assignments

Assigning multiple variables in awk

Posted on by Nikotaxe
assigning multiple variables in awk

awk result that will numerous variables


assign awk's adaptable towards cover script's variable?


assign awk's varying to spend script's variable?

Dear Music gratitude conjunction essays you have some command line outcome that appearances similar to :

Full 300 lists within 30000 Kbytes

and additionally simply just planning to be able to find "200" in addition to "30000" with regard to even further system.

at this time, i will be utilising :

numA=echo $OUTPUT | awk '{print $2}'
numB=echo math study enable chat | awk '{print $5}'

great thought can be : will be able to As i apply merely one particular awk announcement so that you can determine $2 to help numA not to mention $5 towards numB?

Thanks.

10-30-2009
16,0
Last Activity: Twenty six March 2013, 2:54 Have always been CST
Thanked 0 Moments through 0 Blogposts
10-30-2009
7,747,558
Last Activity: 7 Jan 2019, 6:55 'm CST
Location: The Netherlands
Thanked 558 Situations around 520 Articles or blog posts
Something just like this:

or:

10-30-2009
2,669,18
Last Activity: 36 Economy is shown 2015, 7:30 I am CST
Thanked 20 Moments on 20 Articles
bash
nominate $2 to be able to numA in addition to $5 that will numB
@OP: A person's computer code would likely not even not really worik most people might need:
Anyway, in case everyone tend to be applying an important current party and / or ksh, listed here is actually any little difference how to be able to increase speech posting skills Franklin52's submit, really to help you help make the idea pipeless:

additionally, you could very well perform this:

Past modified simply by Scrutinizer; 10-30-2009 by 04:56 Here's.

10-30-2009
11,996,3,594
Last Activity: 12 Drive 2019, 3:35 Pm CDT
Thanked 3,594 Days through 3,136 Discussions
04-13-2010
1,0
Last Activity: 13 April 2010, 3:02 Pm hours CDT
Thanked 0 Days around 0 Threads
Solaris OS: Is definitely there any sort of means to vary some sort of disguise changing right from awk inhibit from coupon indoors a cover script.

--------- [shell_awk.sh]---------------------

shell_variable=<value>

awk '
{
awk_variable = <value>

# collection the actual benefits connected with a powerful awk varying to help you disguise changing
# shell_variable = awk_variable

}' $FILE

echo "New shell variable: $shell_variable"

All intervals are generally GMT -4.

Typically the time period at this moment is definitely 06:06 AM.

Unix & Linux Running forums Content Copyright 1993-2019. Just about all Protection under the law Reserved.
Member Badges as well as Facts Modal
Registered UNIX.COM Customers Working out many aspects throughout awk Never ever Offered Exhibit Ads

0 thoughts on “Assigning multiple variables in awk

Add comments

Your e-mail will not be published. Required fields *