Call a shell command from Python
Wildman
best_lay at yahoo.com
Tue Nov 1 10:34:40 EDT 2016
On Tue, 01 Nov 2016 13:42:03 +0000, Grant Edwards wrote:
> On 2016-11-01, Steve D'Aprano <steve+python at pearwood.info> wrote:
>> On Tue, 1 Nov 2016 04:00 pm, Wildman wrote:
>>
>>> You are correct about that but, in this case grep never "sees" the '$'
>>> sign. Bash expands $USER to the actual user name beforehand. If you
>>> are on a Linux system, enter this into a terminal to illustrate:
>>>
>>> sudo grep ^$USER\: /etc/shadow
>>
>> Bash is not involved here. Python is calling grep directly.
>
> He's already been told this 6 times, and is willfully ignoring it.
>
> Just give up.
That was not my intention. I was trying to understand that
which I did not understand. Ever been there?
--
<Wildman> GNU/Linux user #557453
The cow died so I don't need your bull!
More information about the Python-list
mailing list