Re: ksh equivalent to shell-expand-line
On Sun, Oct 07, 2018 at 11:17:37PM +0200, John Ankarström wrote: [...] > > To which message is this a response? It seems I haven't received > it, but I'd like to read it. Tomasz? I have sent you a message offlist, see if you have it. -- Regards, Tomasz Rola -- ** A C programmer asked whether computer had Buddha's nature. ** ** As the answer, master did "rm -rif" on the programmer's home** ** directory. And then the C programmer became enlightened... ** ** ** ** Tomasz Rola mailto:tomasz_r...@bigfoot.com **
Re: ksh equivalent to shell-expand-line
Klemens Nanni wrote: On Sun, Oct 07, 2018 at 07:30:15PM +0200, Tomasz Rola wrote: Another trick may be executing the line with echo prepended - should do all expansions and write what will be executed. I think it is not going to work too well if for loop is being echoed, and other such things, so perhaps quoting a command and echoing would do the job. This will break any non-trivial construct including pipes, command lists, loops, (nested) quoting, et al. To which message is this a response? It seems I haven't received it, but I'd like to read it. Tomasz? Best regards, John
Re: want.html: Unifi wifi gear for interop debugging
Excuse me for this email, but why the hell many trolls have protonmail email addresses? Just curious, thanks.
Re: ksh equivalent to shell-expand-line
On Sun, Oct 07, 2018 at 07:47:46PM +0200, Klemens Nanni wrote: > On Sun, Oct 07, 2018 at 07:30:15PM +0200, Tomasz Rola wrote: > > Another trick may be executing the line with echo prepended - should > > do all expansions and write what will be executed. I think it is not > > going to work too well if for loop is being echoed, and other such > > things, so perhaps quoting a command and echoing would do the job. > This will break any non-trivial construct including pipes, command lists, > loops, (nested) quoting, et al. And let's not forget about redirections - any writing/appending inside expansion will make echoing it even more non-trivial. However, the same can be said about M-C-e in command prompt - how is the shell going to know it should not expand this particular part, because it calls a script which appends to / deletes from database? And lets say it deletes not quite what we want? Because we are prototyping on live command. Which makes me say again, if this is such nontrivial, then I choose writing a script. -- Regards, Tomasz Rola -- ** A C programmer asked whether computer had Buddha's nature. ** ** As the answer, master did "rm -rif" on the programmer's home** ** directory. And then the C programmer became enlightened... ** ** ** ** Tomasz Rola mailto:tomasz_r...@bigfoot.com **
Re: Dual boot OpenBSD with DragonFly BSD
On Oct 7, 2018 9:22 AM, "Dr. Martin Ivanov" wrote: > > Hello, I am a Linux (Slackware) fan who is keen to try the BSD flavour as > well. I am planning to buy a new laptop, on which to install OpenBSD and > DragonFly BSD in a dual boot set up. I know this is a challenging task, > so I will proceed step by step. > > > My first question is, which operating system has to be installed first, > DragonFly of OpenBSD? Assuming that it is DragonFly, I am planning to: > > > 1. Load DragonFly using a USB boot disk and login as root > > 2. Slice the hard drive in two GPT slices using gpt (e.g., das0 and > das1) > > 3. Create a, b, and d disklabel partitions on the Dragonfly slice > (das0) > > 4. Install DragonFly on das0 > > 5. Create a, b, d, e, and probably some more disklabel partitions on > the OpenBSD slice (das1) > > 6. Install OpenBSD on das1 > > Please correct me on any of the above steps. I will be happy to read your > suggestions. I would be very thankful if you provide the corresponding > commands in your answers. > Thank you very much in advance! As a user of both dragonfly and openbsd, and former slackware user. I would recommend skipping the dual boot and just installing openbsd. It will be much easier and will do everything you want. Maybe just keep half the disk unpartitioned so you can add a second os later or just mount it. I know it doesn't answer the question. Edgar
Re: ksh equivalent to shell-expand-line
On Sun, Oct 07, 2018 at 07:30:15PM +0200, Tomasz Rola wrote: > Another trick may be executing the line with echo prepended - should > do all expansions and write what will be executed. I think it is not > going to work too well if for loop is being echoed, and other such > things, so perhaps quoting a command and echoing would do the job. This will break any non-trivial construct including pipes, command lists, loops, (nested) quoting, et al.
Re: ksh equivalent to shell-expand-line
On Sun, Oct 07, 2018 at 10:13:16AM +0200, Otto Moerbeek wrote: > On Sun, Oct 07, 2018 at 08:48:52AM +0200, Tomasz Rola wrote: > > > On Sun, Oct 07, 2018 at 12:03:31AM +0200, Klemens Nanni wrote: > > > On Sat, Oct 06, 2018 at 09:38:42PM +0200, John Ankarström wrote: > > [...] > > > And yet, it disregards quoting and will errornously expand the following > > > example into multiple words instead of one: > > > > > > bash-4.4$ echo "$(echo a b)" > > > bash-4.4$ echo a b > > > > Just in case it matters to anybody: > > > > $ echo "$(echo a b)" > > a b > > $ bash --version > > GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu) > > > > Looks like something changed in between? > > This is not about executing the line, it's abouty expanding using Ctrl-Alt-e I can see now (side note to myself: do not ever never again reply to emails before going to sleep at morning, sorry). So, can this problem be described as that OP cannot expand this stuff in his memory (this jello ram between the ears), because it has got too complicated? Perhaps this can be helped by writing things into a proper script? I performed a lot of $() things in cli but never learned about M-C-e, so I assume I never did things that required this trick. Hence a script suggestion. Another trick may be executing the line with echo prepended - should do all expansions and write what will be executed. I think it is not going to work too well if for loop is being echoed, and other such things, so perhaps quoting a command and echoing would do the job. Seems like it works in bash as I hoped: ==>$ echo "for i in $(seq 3); do circle ${i}; done" for i in 1 2 3; do circle ; done HTH -- Regards, Tomasz Rola -- ** A C programmer asked whether computer had Buddha's nature. ** ** As the answer, master did "rm -rif" on the programmer's home** ** directory. And then the C programmer became enlightened... ** ** ** ** Tomasz Rola mailto:tomasz_r...@bigfoot.com **
u-boot loader edgerouter
hi the edgerouter becomes an new version of his u-boot bootloader due software update or , maybe , or as new delivery. this version break the boot proccess after fatload usb 0 $(loadaddr) bsd; then he load from the mmc boot partition an file called vmlinux.64.md5 withe the md5 checksum of the bsd kernel, i think. after load he break with checksum failed . you can move forward with the rest of your bootcmd bootoctlinux rootdev=sd0 nucores=4 for example. then he boot openbsd. can someone help to fix the box that he boot complete until login prompt after power on ? holger
Dual boot OpenBSD with DragonFly BSD
Hello, I am a Linux (Slackware) fan who is keen to try the BSD flavour as well. I am planning to buy a new laptop, on which to install OpenBSD and DragonFly BSD in a dual boot set up. I know this is a challenging task, so I will proceed step by step. My first question is, which operating system has to be installed first, DragonFly of OpenBSD? Assuming that it is DragonFly, I am planning to: 1. Load DragonFly using a USB boot disk and login as root 2. Slice the hard drive in two GPT slices using gpt (e.g., das0 and das1) 3. Create a, b, and d disklabel partitions on the Dragonfly slice (das0) 4. Install DragonFly on das0 5. Create a, b, d, e, and probably some more disklabel partitions on the OpenBSD slice (das1) 6. Install OpenBSD on das1 Please correct me on any of the above steps. I will be happy to read your suggestions. I would be very thankful if you provide the corresponding commands in your answers. Thank you very much in advance!
Re: ksh equivalent to shell-expand-line
Klemens Nanni wrote: On Sat, Oct 06, 2018 at 09:38:42PM +0200, John Ankarström wrote: Is there a way for ksh to expand a $(command substitution) without having to execute the entire line? No. That's too bad. bash provides this via shell-expand-line (bound to Ctrl-Alt-e by default), From bash(1): shell-expand-line (M-C-e) Expand the line as the shell does. This performs alias and history expansion as well as all of the shell word expansions. And yet, it disregards quoting and will errornously expand the following example into multiple words instead of one: bash-4.4$ echo "$(echo a b)" bash-4.4$ echo a b There is a discussion about this behavior on the bug-bash mailing list: https://lists.gnu.org/archive/html/bug-bash/2016-11/msg00010.html Turns out to be a relatively simple fix, but the old behavior will remain the default (as of 2016). and ksh seems to have expand-file, but that only works for filenames. We have no other expanding functions. Would there be any interest among the pdksh developers in a function like shell-expand-line (but which works properly), if somebody like me did the work? Best regards, John
sympa and opensmtpd/httpd
Hi, has anyone running sympa with opensmtpd and httpd? I can not figure out how to configure slowcgi correctly in /etc/httpd.conf and if anybody is using this already, I'd really appreciate any hint or config-insight :) thanks Tony -- GPG-KEY: 0x5C5C239D81121B35 GPG-FP: 49CC8250 CDCF2183 6209C1AE 625677C1 F7783D5F
Re: ksh equivalent to shell-expand-line
On Sun, Oct 07, 2018 at 08:48:52AM +0200, Tomasz Rola wrote: > On Sun, Oct 07, 2018 at 12:03:31AM +0200, Klemens Nanni wrote: > > On Sat, Oct 06, 2018 at 09:38:42PM +0200, John Ankarström wrote: > [...] > > And yet, it disregards quoting and will errornously expand the following > > example into multiple words instead of one: > > > > bash-4.4$ echo "$(echo a b)" > > bash-4.4$ echo a b > > Just in case it matters to anybody: > > $ echo "$(echo a b)" > a b > $ bash --version > GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu) > > Looks like something changed in between? This is not about executing the line, it's abouty expanding using Ctrl-Alt-e -Otto
Re: ksh equivalent to shell-expand-line
On Sun, Oct 07, 2018 at 12:03:31AM +0200, Klemens Nanni wrote: > On Sat, Oct 06, 2018 at 09:38:42PM +0200, John Ankarström wrote: [...] > And yet, it disregards quoting and will errornously expand the following > example into multiple words instead of one: > > bash-4.4$ echo "$(echo a b)" > bash-4.4$ echo a b Just in case it matters to anybody: $ echo "$(echo a b)" a b $ bash --version GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu) Looks like something changed in between? -- Regards, Tomasz Rola -- ** A C programmer asked whether computer had Buddha's nature. ** ** As the answer, master did "rm -rif" on the programmer's home** ** directory. And then the C programmer became enlightened... ** ** ** ** Tomasz Rola mailto:tomasz_r...@bigfoot.com **