Re: whoami explanation
| From: | Michael A. Peters | Date: | Wed, 04 Mar 2009 13:25:11 +0000 |
| Subject: | Re: whoami explanation | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-289227@lists.php.net to get a copy of this message | ||
Peter Ford wrote:
PJ wrote:which works as long as you can guarantee that none your file names contain spaces ... ;)Per Jessen wrote:In your bash shell, you can use backticks in a similar way to how PHP uses them - to assign the output of a command to a variable. For example: LIST=PJ wrote:Ok, but how does this relate to a command passed from a php Web page? I don't understand the processus. I use bash on my FreeBSD and have not needed a back quote yet that I can recall... and on WinXP?forgot to add: What's the difference between back ticks or quotes and regular single quotes?text in back ticks is executed via a shell, text in single quotes isn't.find . -name '*.php'will fill up the shell variable $LIST with all the files with extension .php below the current directory. You could then do something with that variable, like for FILE in $LIST do cp $FILE $FILE.bak done