Re: putting something into single quotes in a bash script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Petrus de Calguarium wrote:
> ps -fu 'whoami'

This just passes the text whoami as a group argument with no execution 
of whoami.

ps -fu whoami
^
Equivalent command

> ps -fu `whoami`

The accent graves tell bash to execute the text inside them. The whoami 
command will be executed then passed to ps -fu.

-- 
users mailing list
[email protected]
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux