Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Interesting result...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Interesting result...
Authored by: leamanc on Mar 25, '10 08:01:38AM

I'm on Snow Leopard with all the latest updates. Copying the above command to the clipboard and using `pbpaste` as described in the hint, I get the following error:


ls: $HOME: No such file or directory

But by pasting the command directly (with command-V), the $HOME shell variable is parsed properly, and I get the expected ls output.

Edited on Mar 25, '10 08:02:32AM by leamanc


[ Reply to This | # ]
Me too, needs eval
Authored by: lullabud on Mar 25, '10 11:20:24AM
dho@dt:~$ echo 'ls -l -G -a -F $HOME' | pbcopy
dho@dt:~$ pbpaste
ls -l -G -a -F $HOME
dho@dt:~$ `pbpaste`
ls: $HOME: No such file or directory
dho@dt:~$ eval `pbpaste` | head -n 3
total 232
drwxr-xr-x@ 56 dho staff 1904 Mar 25 11:16 ./
drwxr-xr-x 5 root admin 170 Feb 19 09:21 ../


[ Reply to This | # ]