Thanks for all your answers.
David
--
https://mail.python.org/mailman/listinfo/python-list
In a message of Thu, 29 Oct 2015 11:11:17 +0100, Laura Creighton writes:
>In a message of Thu, 29 Oct 2015 09:52:56 +, David Aldrich writes:
>>Hi
>>
>>I am working on Linux with Python 3.4.
>>
>>I want to do a bash diff on two text files and show just the first 20 lines
>>of diff's output. So
David Aldrich wrote:
> I am working on Linux with Python 3.4.
>
> I want to do a bash diff on two text files and show just the first 20
> lines of diff's output. So I tried:
>
cmd = 'head -20 <(diff ' + file1 + ' ' + file2 + ')'
subprocess.check_call(cmd, shell=True)
>
> The command
In a message of Thu, 29 Oct 2015 09:52:56 +, David Aldrich writes:
>Hi
>
>I am working on Linux with Python 3.4.
>
>I want to do a bash diff on two text files and show just the first 20 lines of
>diff's output. So I tried:
>
cmd = 'head -20 <(diff ' + file1 + ' ' + file2 + ')'
subpr
On 29/10/15 16:52, David Aldrich wrote:
Hi
I am working on Linux with Python 3.4.
I want to do a bash diff on two text files and show just the first 20
lines of diff’s output. So I tried:
>>> cmd = 'head -20 <(diff ' + file1 + ' ' + file2 + ')'
>>> subprocess.check_call(cmd, shell=True)
> Try this
> subprocess.check_call(["bash", "-O", "extglob", "-c", cmd])
That worked. Thanks very much!
David
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Oct 29, 2015 at 6:52 PM, David Aldrich
wrote:
> Hi
>
>
>
> I am working on Linux with Python 3.4.
>
>
>
> I want to do a bash diff on two text files and show just the first 20
> lines of diff’s output. So I tried:
>
>
>
> >>> cmd = 'head -20 <(diff ' + file1 + ' ' + file2 + ')'
>
> >>> s