changed awk to sed for compatibility in ubuntu/debian