X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:references:in-reply-to:subject:date :message-id:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=G654tUR1Li7yW5/flbb2V6tRannmGh1XJZ3qBk8HAJq ygDhwfp3SC7Z46aMEDYycpr6KLeQxHefpqqR75019LjT2tGO+dVwyvT+54cgW8tL KuTP1D0tWV3QRL3Ku1KGOSdL9664IL2gzS2oXNHiyJRzIUi+g+L9X8mftW6ut/74 = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:references:in-reply-to:subject:date :message-id:mime-version:content-type:content-transfer-encoding; s=default; bh=mnCm+ahm+3A4wltwygNmtXDPkJc=; b=fir+XG6MZ8SrOFpif ZWr0NhULO5VX/UUG5V7H1kEQIRYB1XYgbGIUuF7F77gqN0sKo5Irwo25kKCSWp3a b2f12OvPiSJvRZoUf++gvTFi6CPCKktNfOi5IDhnykrJ9hJt7aTWLPYhoB95qtzA jymHi0TXFrDp9k+3aV60EEb0nM= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=AWL,BAYES_05,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=editor, d2u, endings, dos2unix X-HELO: resqmta-po-04v.sys.comcast.net From: "Andy Hall" To: "'Doug Henderson'" , "'cygwin'" References: <001801d2db33$5a560e90$0f022bb0$@comcast.net> In-Reply-To: Subject: RE: Bash seg faulting? Date: Fri, 2 Jun 2017 08:52:41 -0700 Message-ID: <002201d2dbb8$45646b00$d02d4100$@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-CMAE-Envelope: MS4wfI9q/62tamYVJVIRQFkAJujbN9OCw2/1Glu8fiz1kNORQihaIDk3F2AhYgFDg7A7dzKO2xNgvjeeEq0SY4mB149DQzMfBmJho+bf42D6IvN32e7WyDW8 mDp2x/3e3OVzfY+d2TABvnUtLLPXYpP+9lQpwHaBVfJZPQBAQcPd7xngo0tnxAQkVT94CnlOWZj7dFqvZaaDoq3DQNmZnJfnlOQ= X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id v52Fr44s017701 On 1 June Doug Henderson wrote: > > On 1 June 2017 at 18:01, Andy Hall wrote: > > > > Here is a strange one. I have two scripts, conv.sh and conv.bat that do the same thing: scan the current directory for > > .doc files and convert them to .docx files. Here are the two scripts. > > > > $ cat conv.sh > > #!/bin/bash > > > > Try running "cat -e conv.sh" to see if you have dos line endings, e.g. > CR LF, instead of unix line endings, e.g. LF only. > > If you do, run "dos2unix conv.sh" or "d2u conv.sh" to fix the line > ending problem. Check that your editor can create files with unix line > endings, and preserves unix line endings. > > HTH > Doug > First of all, the Wordconv.exe converts a .doc file to a .docx file, ostensible writing no output. However, I find if I change the script to read: #!/bin/bash OFFICE_BIN="C:\Program Files (x86)\Microsoft Office\root\Office16" for doc in *.doc; do echo "converting: $doc" "$OFFICE_BIN"/Wordconv.exe -oice -nme "$doc" "${doc}x" | od done and run, I don’t get the seg faults, but od is showing no output written as you might expect (as in od