help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: script coded, doesnt work, when spawned with -x works


From: Chet Ramey
Subject: Re: script coded, doesnt work, when spawned with -x works
Date: Thu, 31 Mar 2022 16:31:05 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

On 3/31/22 12:16 PM, Alex fxmbsw7 Ratchev wrote:
i coded [ or tried ] to code a ' urlhop '

script url
shows menu of links with titles to select to next fetch

now just, why doesnt it work
i try bash run gnu.org it doesnt work, nothing back
i do bash -x run gnu.org it displayed a menu and waited for input

run is the bash part ( eg urlhop )
and urlhop.gawk is the html parser

proof i have :

bash run gnu.org

0 exit 4621s old @1648743015.301939 == Thu Mar 2022-03-31 16:10:15.301939
+0000


bash -x run gnu.org

<snip>
9)
  #content

10)
  /gnu/gnu.html
   ABOUT&nbsp;GNU
11)
  /philosophy/philosophy.html
   PHILOSOPHY
12)


you see its buggy i have to fix it but i cant as long as it only works with
-x

My bet is that it doesn't `work' with -x, but that you interpret the -x
output as some kind of result.

How do you expect this to work, anyway? You consume the entire standard
input in urlhop.reader, throwing everything into one long string, then try to read again? What do you expect that second read to do? Why?

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]