Hacker News new | past | comments | ask | show | jobs | submit login

     sudo -u postgres createuser -s `whoami`
Won't this create another user named "postgres"?

EDIT: No it won't:

     Ophelia ~ $ sudo -u postgres whoami
     postgres
     Ophelia ~ $ sudo -u postgres echo `whoami`
     rich
That seems straight out of The Unix Hater's Handbook.



The idea that commandline expansions like $VAR, `backtick` and wild*cards are done by the shell, before the program is invoked, is not particularly esoteric is it?


No. But, I had to think about it.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: