I try to copy a command from history. How can I copy the 510th command? Please, see the data below. My bet is:
history | grep 510 | sed '1q;d' | awk '{print $2-$10}' | pbcopy
but the output is 0. I cannot understand the reason. What is wrong in the command?
505 find . -perm=750 -print0 | xargs -0 chmod 750
506 find . --perm=750 -print0 | xargs -0 chmod 750
507 find . -perm=750 -print0 | xargs -0 chmod 750
508 find . -perm=750 -print0 | xargs -0 chmod 750
510 find . -perm 750 -print0 | xargs -0 chmod 750
512 history | grep perm 750 -print0 | pbcopy