I'd like to copy commands from my recent command history into a file, but the history looks like this:
568 find . -name "*.txt" -mtime -1 -print -exec awk '$9 != "" && NR <= 10' {} \;
569 find . -name "*.txt" -mtime -1 -print -exec awk '$9 != "" && n < 10 {print; n++}' {} \;
570 history 10
I want to strip off the numbers on the left. Is there a short way to do this in awk without explicitly using $2 $3 $4 etc. to output everything but the first field?