Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why the test of both $# and $1?

    tr -dc '!-~' </dev/urandom | head -c ${1-12}; echo
Change to A-Za-z0-9, etc., to suit.


Mostly because I'm terrible at shell scripting. Thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: