Re: Add "-c command" option to script(1)

2018-01-17 Thread Paul de Weerd
ping Anyone? Buehler? :) Paul On Mon, Dec 25, 2017 at 12:23:44PM +0100, Paul de Weerd wrote: | Hi all, | | Sorry to keep harping on this script stuff, but I'd really like to see | this committed. I've just upgraded my laptop while doing some | vlan-bridging debugging and suddenly script(1)

Re: Add "-c command" option to script(1)

2017-12-25 Thread Paul de Weerd
Hi all, Sorry to keep harping on this script stuff, but I'd really like to see this committed. I've just upgraded my laptop while doing some vlan-bridging debugging and suddenly script(1) lost my new favorite feature. The manpage bits are OK jmc@; job@ and ian@ (off-list) OK'd the diff. Is

Re: Add "-c command" option to script(1)

2017-12-16 Thread Job Snijders
On Sat, Dec 16, 2017 at 09:45:02AM +0100, Paul de Weerd wrote: > On Fri, Dec 15, 2017 at 12:24:45PM +0100, Paul de Weerd wrote: > | I've updated the diff to add this example as per jmc's suggestion. It > | now has: > | > | - add the `-c command` feature > | - updates usage > | -

Re: Add "-c command" option to script(1)

2017-12-16 Thread Paul de Weerd
On Fri, Dec 15, 2017 at 12:24:45PM +0100, Paul de Weerd wrote: | I've updated the diff to add this example as per jmc's suggestion. It | now has: | | - add the `-c command` feature | - updates usage | - removes /* ARGSUSED */ lint comments | - documents the -c feature |

Re: Add "-c command" option to script(1)

2017-12-15 Thread Job Snijders
On Thu, Dec 14, 2017 at 09:23:29AM +0100, Paul de Weerd wrote: > Another use I personally find very convenient is this: > > [weerd@pom] $ script -c "vmctl start test -c" > > Hope others see value here too :) That is a great use case. Kind regards, Job

Re: Add "-c command" option to script(1)

2017-12-15 Thread Paul de Weerd
On Thu, Dec 14, 2017 at 08:49:18AM +, Jason McIntyre wrote: | On Thu, Dec 14, 2017 at 09:23:29AM +0100, Paul de Weerd wrote: | > Another use I personally find very convenient is this: | > | > [weerd@pom] $ script -c "vmctl start test -c" | | you could add this as an EXAMPLES section, since

Re: Add "-c command" option to script(1)

2017-12-14 Thread Jason McIntyre
On Thu, Dec 14, 2017 at 09:23:29AM +0100, Paul de Weerd wrote: > Another use I personally find very convenient is this: > > [weerd@pom] $ script -c "vmctl start test -c" > > Hope others see value here too :) > > Paul > you could add this as an EXAMPLES section, since it nicely describes

Re: Add "-c command" option to script(1)

2017-12-14 Thread Paul de Weerd
Another use I personally find very convenient is this: [weerd@pom] $ script -c "vmctl start test -c" Hope others see value here too :) Paul On Thu, Dec 14, 2017 at 08:45:19AM +0100, Paul de Weerd wrote: | Hi Jason, | | Thank you for your quick feedback! I've incorporated yours and | off-list

Re: Add "-c command" option to script(1)

2017-12-13 Thread Paul de Weerd
Hi Jason, Thank you for your quick feedback! I've incorporated yours and off-list feedback from ian@ into a new diff included below. The diff now also includes the removal of /* ARGSUSED */ lint comments. On Wed, Dec 13, 2017 at 09:34:03PM +, Jason McIntyre wrote: | > +To run a | | i'd

Re: Add "-c command" option to script(1)

2017-12-13 Thread Jason McIntyre
On Wed, Dec 13, 2017 at 05:45:25PM +0100, Paul de Weerd wrote: > > Index: script.1 > === > RCS file: /cvs/src/usr.bin/script/script.1,v > retrieving revision 1.14 > diff -u -p -r1.14 script.1 > --- script.1 15 Jan 2012 20:06:40

Add "-c command" option to script(1)

2017-12-13 Thread Paul de Weerd
Hi all, As seen in NetBSD, FreeBSD and Linux, script(1) could do with a way to tell it what command to run instead of your $SHELL. This implements the "-c command" option. I've taken the logic to start the command (and its arguments, if any) from crontab(1), execv'ing `sh -c `. I wrote this