I want to write an awk script file using the #!/bin/awk -f
header, but I want this script to always use :
as a field separator. But for some reason writing #!/bin.awk -F: -f
gives me a syntax error. I also want this script to always run on the same file, so I'd like to hardcode that as well. Basically, what I want to work is this:
#!/bin/awk -F: -f -- /etc/passwd
followed by some awk code
See Question&Answers more detail:os