Re: trivial with echo command

2012-12-18 Thread Andres Perera
On Tue, Dec 18, 2012 at 6:32 AM, Marc Espie wrote: > On Tue, Dec 18, 2012 at 11:47:59AM +0100, Alexander Hall wrote: >> >> >> Andres Perera wrote: >> >> >On Mon, Dec 17, 2012 at 7:07 PM, Alexander Hall >> >wrote: >> >> >> >> For scripting, echo is one of the commands I tend to avoid unless I >>

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

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 posix

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 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

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 wrote: > > > > >On Mon, Dec 17, 2012 at 7:07 PM, Alexander Hall > > >wrote: > > >> > > >> For scripting, echo is one of the commands I tend to avoid

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 wrote: > > >On Mon, Dec 17, 2012 at 7:07 PM, Alexander Hall > >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 argu

Re: trivial with echo command

2012-12-18 Thread Alexander Hall
Andres Perera wrote: >On Mon, Dec 17, 2012 at 7:07 PM, Alexander Hall >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 >bui

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 > 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 > >

Re: trivial with echo command

2012-12-17 Thread Philip Guenther
On Mon, Dec 17, 2012 at 5:14 PM, 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

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 ech

Re: trivial with echo command

2012-12-17 Thread Andres Perera
On Mon, Dec 17, 2012 at 7:07 PM, Alexander Hall 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 unknown da

Re: trivial with echo command

2012-12-17 Thread sven falempin
On Mon, Dec 17, 2012 at 6:37 PM, Alexander Hall 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 >>> wrote: >>> On 2012-12-17, sven falempin wrote: > Hello misc readers,

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 wrote: On 2012-12-17, sven falempin wrote: Hello misc readers, First, openBSD threads are awesome for debugging. The trivial topic, echo -ne "\x00" | nc XXX

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 > wrote: > > On 2012-12-17, sven falempin wrote: > >> Hello misc readers, > >> > >> First, openBSD threads are awesome for debugging. > >> The trivial topic, > >> echo -ne "\x00" | nc port > >> sen

Re: trivial with echo command

2012-12-17 Thread Andres Perera
On Mon, Dec 17, 2012 at 6:13 PM, Stuart Henderson wrote: > On 2012-12-17, sven falempin 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

Re: trivial with echo command

2012-12-17 Thread Stuart Henderson
On 2012-12-17, sven falempin 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 question: > H

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 s

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