Created
March 12, 2019 20:03
-
-
Save a2gs/5dc5f16403d36902c6f22ef71848ebc4 to your computer and use it in GitHub Desktop.
Shell script calling a (inside) AWK script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
func(){ | |
awk -v VAR1=$3 -v VAR2=$4 ' | |
BEGIN{ | |
} | |
{ | |
print VAR1 VAR2 | |
} | |
END{ | |
}' $1 > $2 | |
} | |
OUT="$1"_out | |
func $1 $OUT "asd" "qwe" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment