First of all, if you write bash, do not use #!/bin/sh , which puts you in compatibility mode, which is only necessary if you write for portability (and then you must adhere to the POSIX normative).
Now, regarding your question, you just need to run awk from your bash script, for example:
#!/bin/bash var1=$1 awk -f myawk.sh
you should also use .awk as an extension, I think.
source share