Sed and Awk Shebangs

#!/bin/bash

sed 's/some pattern/something else/g' $*

…is bad form, in my opinion.

#!/usr/bin/sed -f

s/some pattern/something else/g

…seems so much better.

#!/bin/bash

awk '/some pattern/ { print }' $*

…is bad form, in my opinion.

#!/bin/awk -f

/some pattern/ { print } 

…seems so much better.

Published on December 13, 2016


Related Posts