grep username: /etc/passwd | cut -d: -f6 perl -le 'print glob "~username"'; [download]
In reply to Re^3: ~username expansion by tachyon in thread ~username expansion by Anonymous Monk