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: Alex fxmbsw7 Ratchev
Subject: Re: script coded, doesnt work, when spawned with -x works
Date: Fri, 1 Apr 2022 00:28:07 +0200

here a seemfully perfect working version

most work in between now was the gawk transformation from relative links to
absolute

On Thu, Mar 31, 2022 at 11:24 PM Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
wrote:

> ohhhhhhhh i have the data parsing stream in
> not the user input tty
> thank you =))
>
> On Thu, Mar 31, 2022 at 11:23 PM Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
> wrote:
>
>> .. i replaced the -p with a printf before
>> the read just exits
>>
>> .. no idea
>>
>> On Thu, Mar 31, 2022 at 11:18 PM Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
>> wrote:
>>
>>> may there be some read -p length overflow bug
>>>
>>> it shows
>>> as it should
>>> read as last command
>>>
>>> <..long -p input>
>>> Commons Attribution-NoDerivatives 4.0 International License
>>> 123)
>>>  //www.fsf.org/about/dmca-notice
>>>   Copyright Infringement Notification
>>> >' -N 1 read
>>>
>>> # read variable of read command
>>>
>>> but exits..
>>>
>>>
>>> On Thu, Mar 31, 2022 at 11:16 PM Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Thu, Mar 31, 2022 at 11:13 PM Alex fxmbsw7 Ratchev <
>>>> fxmbsw7@gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Thu, Mar 31, 2022 at 10:31 PM Chet Ramey <chet.ramey@case.edu>
>>>>> wrote:
>>>>>
>>>>>> 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.
>>>>>>
>>>>>
>>>>>
>>>> yea i misinterpreted, .. it exited also no read user menu loop
>>>> i saw menu entries though .. in set -x .. which partly i pasted from it
>>>> seems
>>>>
>>>>
>>>>> hm i dont have any related code in use at all
>>>>>
>>>>> i run bash run gnu.org and expected a shit
>>>>> it exits 0
>>>>>
>>>>> i ran with -x to see where its hung
>>>>> it .. maybe ran maybe not yes i gotta check im not sure here sorry
>>>>>
>>>>>
>>>>>> 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?
>>>>>>
>>>>>
>>>>> its the simple principe of recursed function use
>>>>> where in meta its 1. fetch url 2. analyze url 3. read output of
>>>>> parsing and proceed further, like beging with 1. and new url again
>>>>>
>>>>> i .. err .. read again to make input sure
>>>>> user might type b which is no entry
>>>>>
>>>>> ..
>>>>>
>>>>>
>>>>>>
>>>>>> --
>>>>>> ``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/
>>>>>>
>>>>>

Attachment: urlhop
Description: Binary data

Attachment: urlhop.gawk
Description: Binary data


reply via email to

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