Created
July 7, 2021 17:33
-
-
Save genothomas/8589d082d35beb9848dc080cd3c35a7b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
# | |
# Shows how awk can have use embedded bash variable | |
# | |
thedir="/tmp" | |
ls $thedir | awk -v thedir=$thedir '{ printf "directory %s has file %s\n",thedir,$1 }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment