Skip to content

Instantly share code, notes, and snippets.

@pmihalcin
Last active September 19, 2018 18:27
Show Gist options
  • Select an option

  • Save pmihalcin/6004bf3973d2401a685675d35b013aa4 to your computer and use it in GitHub Desktop.

Select an option

Save pmihalcin/6004bf3973d2401a685675d35b013aa4 to your computer and use it in GitHub Desktop.
#!/bin/awk -f
BEGIN {
# Print the squares from 1 to 10
for (i=1; i <= 10; i++) {
printf "The square of ", i, " is ", i*i;
}
# now end
exit;
}
#!/bin/awk -f
BEGIN {
print "File\tOwner"
}
{
print $9, "\t", $3
}
END {
print " - DONE -"
}
// ls -l | awk -f file-owner.awk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment