From: <tomas@tuxteam.de>
To: guile-user@gnu.org
Subject: Re: system command output different in guile than on command line
Date: Wed, 5 Aug 2020 09:47:09 +0200 [thread overview]
Message-ID: <20200805074709.GA27513@tuxteam.de> (raw)
In-Reply-To: <1155809260.1393834.1596576862334@mail.yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 868 bytes --]
On Tue, Aug 04, 2020 at 09:34:22PM +0000, vapnik spaknik wrote:
> Hi,
> I'm trying to write some code to get the size of a diff of two files.
> If I run the following pipeline in my zsh shell:
>
> > diff -ua /tmp/file1 /tmp/file2 | wc -c
>
> it prints 215
> However when I run the following in guile:
>
> guile> (system "diff -ua /tmp/file1 /tmp/file2 | wc -c")
Have you actually tried to compare both results?
There are a couple of things which could make a difference. The
one which first comes to mind would be different environments
(PATH, language settings in LANG, LC_).
One thing you might want to try (to keep most of your experimental
setup) would be:
diff -ua /tmp/file1 /tmp/file2 > /tmp/delta1
and then
guile> (system "diff -ua /tmp/file1 /tmp/file2 > /tmp/delta2")
...and then diff the diffs.
Cheers
-- t
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2020-08-05 7:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1155809260.1393834.1596576862334.ref@mail.yahoo.com>
2020-08-04 21:34 ` system command output different in guile than on command line vapnik spaknik
2020-08-05 7:47 ` tomas [this message]
2020-08-05 11:27 ` vapnik spaknik via General Guile related discussions
2020-08-05 12:24 ` tomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200805074709.GA27513@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).