Re: [obsd] Re: trivial with echo command

2012-12-18 Thread Jeremie Le Hen
On Mon, Dec 17, 2012 at 08:43:45PM -0800, Philip Guenther wrote: On Mon, Dec 17, 2012 at 5:14 PM, sven falempin sven.falem...@gmail.com wrote: So much to just print ... so: 1 echo is crap (not portable, not very usefull) 2 print is doing echo job in ksh print [-nprsu[n] | -R [-en]]

Re: trivial with echo command

2012-12-18 Thread Alexander Hall
Andres Perera andre...@zoho.com wrote: On Mon, Dec 17, 2012 at 7:07 PM, Alexander Hall alexan...@beard.se wrote: For scripting, echo is one of the commands I tend to avoid unless I know the data is safe, because of it's horrific argument parsing. I've yet to find a way to echo a single '-n'

Re: trivial with echo command

2012-12-18 Thread Marc Espie
On Tue, Dec 18, 2012 at 11:47:59AM +0100, Alexander Hall wrote: Andres Perera andre...@zoho.com wrote: On Mon, Dec 17, 2012 at 7:07 PM, Alexander Hall alexan...@beard.se wrote: For scripting, echo is one of the commands I tend to avoid unless I know the data is safe, because of

Re: trivial with echo command

2012-12-18 Thread Eric Furman
On Tue, Dec 18, 2012, at 06:02 AM, Marc Espie wrote: On Tue, Dec 18, 2012 at 11:47:59AM +0100, Alexander Hall wrote: Andres Perera andre...@zoho.com wrote: On Mon, Dec 17, 2012 at 7:07 PM, Alexander Hall alexan...@beard.se wrote: For scripting, echo is one of the commands I

Re: trivial with echo command

2012-12-18 Thread Marc Espie
On Tue, Dec 18, 2012 at 12:02:15PM +0100, Marc Espie wrote: Is this theoretical, or is there an actual Makefile where this is a problem ? I'd rather NOT go through extra shell forking just for the sake of it. Also, echo -e is specific to ksh and NOT a posix option, so you're going to end

Re: trivial with echo command

2012-12-18 Thread Dustin Fechner
On 12/18/2012 12:42 PM, Eric Furman wrote: echo is Legacy. It is non standard and should never be used. Please use print or printf And print is standard? bash: print: command not found... hmm...

Re: trivial with echo command

2012-12-18 Thread Alexander Hall
On 12/18/12 12:54, Marc Espie wrote: On Tue, Dec 18, 2012 at 12:02:15PM +0100, Marc Espie wrote: Is this theoretical, or is there an actual Makefile where this is a problem ? I'd rather NOT go through extra shell forking just for the sake of it. Also, echo -e is specific to ksh and NOT a

Re: trivial with echo command

2012-12-18 Thread Marc Espie
On Tue, Dec 18, 2012 at 01:47:54PM +0100, Alexander Hall wrote: On 12/18/12 12:54, Marc Espie wrote: On Tue, Dec 18, 2012 at 12:02:15PM +0100, Marc Espie wrote: Is this theoretical, or is there an actual Makefile where this is a problem ? I'd rather NOT go through extra shell forking just

Re: trivial with echo command

2012-12-18 Thread Andres Perera
On Tue, Dec 18, 2012 at 6:32 AM, Marc Espie es...@nerim.net wrote: On Tue, Dec 18, 2012 at 11:47:59AM +0100, Alexander Hall wrote: Andres Perera andre...@zoho.com wrote: On Mon, Dec 17, 2012 at 7:07 PM, Alexander Hall alexan...@beard.se wrote: For scripting, echo is one of the commands

trivial with echo command

2012-12-17 Thread sven falempin
Hello misc readers, First, openBSD threads are awesome for debugging. The trivial topic, echo -ne \x00 | nc port send a null byte with a GNU echo. Echo in openbsd does not have -e (and does not warn whan i try it ..) Noob question: How to send a null byte over netcat ? am i forced to use

Re: trivial with echo command

2012-12-17 Thread Andres Perera
echo expands nil from C backslash sequences just fine: andres@pote:~/tmp $ alias vis vis='vis -cl -F$COLUMNS' andres@pote:~/tmp $ echo '\0a' | vis \0a\$ andres@pote:~/tmp $ perl -e 'print \0a\n' | vis \0a\$ what's most likely happening is that the protocol that you're targeting treats '\0' as

Re: trivial with echo command

2012-12-17 Thread Stuart Henderson
On 2012-12-17, sven falempin sven.falem...@gmail.com wrote: Hello misc readers, First, openBSD threads are awesome for debugging. The trivial topic, echo -ne \x00 | nc port send a null byte with a GNU echo. Echo in openbsd does not have -e (and does not warn whan i try it ..) Noob

Re: trivial with echo command

2012-12-17 Thread Andres Perera
On Mon, Dec 17, 2012 at 6:13 PM, Stuart Henderson s...@spacehopper.org wrote: On 2012-12-17, sven falempin sven.falem...@gmail.com wrote: Hello misc readers, First, openBSD threads are awesome for debugging. The trivial topic, echo -ne \x00 | nc port send a null byte with a GNU echo.

Re: trivial with echo command

2012-12-17 Thread Stuart Henderson
On 2012/12/17 18:26, Andres Perera wrote: On Mon, Dec 17, 2012 at 6:13 PM, Stuart Henderson s...@spacehopper.org wrote: On 2012-12-17, sven falempin sven.falem...@gmail.com wrote: Hello misc readers, First, openBSD threads are awesome for debugging. The trivial topic, echo -ne \x00

Re: trivial with echo command

2012-12-17 Thread Alexander Hall
On 12/18/12 00:20, Stuart Henderson wrote: On 2012/12/17 18:26, Andres Perera wrote: On Mon, Dec 17, 2012 at 6:13 PM, Stuart Henderson s...@spacehopper.org wrote: On 2012-12-17, sven falempin sven.falem...@gmail.com wrote: Hello misc readers, First, openBSD threads are awesome for debugging.

Re: trivial with echo command

2012-12-17 Thread sven falempin
On Mon, Dec 17, 2012 at 6:37 PM, Alexander Hall alexan...@beard.se wrote: On 12/18/12 00:20, Stuart Henderson wrote: On 2012/12/17 18:26, Andres Perera wrote: On Mon, Dec 17, 2012 at 6:13 PM, Stuart Henderson s...@spacehopper.org wrote: On 2012-12-17, sven falempin sven.falem...@gmail.com

Re: trivial with echo command

2012-12-17 Thread Andres Perera
On Mon, Dec 17, 2012 at 7:07 PM, Alexander Hall alexan...@beard.se wrote: For scripting, echo is one of the commands I tend to avoid unless I know the data is safe, because of it's horrific argument parsing. I've yet to find a way to echo a single '-n' using the sh/ksh builtin. When printing

Re: trivial with echo command

2012-12-17 Thread Mayuresh Kathe
On Mon, 17 Dec 2012, sven falempin wrote: So much to just print ... so: 1 echo is crap (not portable, not very usefull) 2 print is doing echo job in ksh print [-nprsu[n] | -R [-en]] [argument ...] (but this is completly different on pengouinOS) 3 printf is everywhere and works fine why do

Re: trivial with echo command

2012-12-17 Thread Philip Guenther
On Mon, Dec 17, 2012 at 5:14 PM, sven falempin sven.falem...@gmail.com wrote: So much to just print ... so: 1 echo is crap (not portable, not very usefull) 2 print is doing echo job in ksh print [-nprsu[n] | -R [-en]] [argument ...] (but this is completly different on pengouinOS) 3 printf