Skip to main content
properly indent instead of the spurious copy-pasto
Source Link
user313992
user313992

Use the -f - option to awk to take the script from stdin and a here-document:

awk -F: -v "ID=$ID_minimum" -f - <<'EOT' /etc/passwd $3>=1000 && $1!="nfsnobody" { {  print "xfs_quota -x -c 'limit bsoft=5g bhard=6g "$1"' /home "  } EOT 

Use the -f - option to awk to take the script from stdin and a here-document:

awk -F: -v "ID=$ID_minimum" -f - <<'EOT' /etc/passwd $3>=1000 && $1!="nfsnobody" { print "xfs_quota -x -c 'limit bsoft=5g bhard=6g "$1"' /home "} EOT 

Use the -f - option to awk to take the script from stdin and a here-document:

awk -F: -v "ID=$ID_minimum" -f - <<'EOT' /etc/passwd $3>=1000 && $1!="nfsnobody" {   print "xfs_quota -x -c 'limit bsoft=5g bhard=6g "$1"' /home "  } EOT 
Source Link
user313992
user313992

Use the -f - option to awk to take the script from stdin and a here-document:

awk -F: -v "ID=$ID_minimum" -f - <<'EOT' /etc/passwd $3>=1000 && $1!="nfsnobody" { print "xfs_quota -x -c 'limit bsoft=5g bhard=6g "$1"' /home "} EOT