Hongyi Zhao on Tue, 10 Jan 2023 09:21:20 +0100


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

Re: Programmatically obtain a complete list of commands and keywords for updating the PARI/GP third-party IDE tools.


On Tue, Jan 10, 2023 at 3:41 PM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> On Tue, Jan 10, 2023 at 2:54 PM Karim Belabas
> <Karim.Belabas@math.u-bordeaux.fr> wrote:
> >
> > * Hongyi Zhao [2023-01-10 03:16]:
> > [...]
> > > Nice trick. But there are still the following issues that need to be dealt with:
> > >
> > > 1. How to display all of these symbols in a non-interactive way at
> > > once, instead of split-screen output and prompt for the following
> > > information?
> > >
> > > /*-- (type RETURN to continue) --*/
> > >
> > > 2. How to dump the entire result to a file for further use?
> >
> > Maybe something like
> >
> > echo '?*' | gp -fq | grep -v 'type RETURN' | sed -e 's/  */\n/g' > gpfunctions
>
> Nice trick. I made the following modification to it:
>
> $ echo '?*' | gp -fq | grep -v 'type RETURN' | sed -Ee 's/[ ]+/\n/g'|
> sed -Ee '/^$/d' > gpfunctions

Strangely, if I combine the above two sed commands into a single sed
call, the last line will be blank in the output:

werner@X10DAi:~$ echo '?*' | gp -fq | grep -v 'type RETURN' | sed -Ee
's/[ ]+/\n/g;/^$/d' | tail | cat -A
znconreychar$
znconreyconductor$
znconreyexp$
znconreylog$
zncoppersmith$
znlog$
znorder$
znprimroot$
znstar$
$
werner@X10DAi:~$

Best,
Zhao