Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

pass awk varible to bash

x=10
y=30
text="some_texts"
awk -v a=$x -v b=$y -v c="$text" 'BEGIN {ans=a+b; print c " " ans}'
					#	for text it need " "
Source by www.cyberciti.biz #
 
PREVIOUS NEXT
Tagged: #pass #awk #varible #bash
ADD COMMENT
Topic
Name
5+3 =