Re: csh builtin command problems

2012-05-14 Thread Robert Simmons
On Mon, May 14, 2012 at 1:45 PM, Ian Lepore
 wrote:
> On Wed, 2012-05-09 at 21:34 -0400, Robert Simmons wrote:
>> I'm trying to use sysv style echo in /bin/csh and I've hit a wall as
>> to how to get it to work.
>>
>> The following does not have the outcome that I'm looking for:
>>
>> # echo_style=sysv
>> # echo test\ttest > test
>> # cat test
>> testttest
>>
>> I want this:
>>
>> # echo test\ttest > test
>> # cat test
>> test    test
>>
>> Any thoughts?
>
> What I see on 8.3 is this:
>
> % set echo_style=sysv
> % echo test\ttest
> testttest
> % echo "test\ttest"
> test    test
> %
>
> So it seems from this very minimal test that the implementation of echo
> is correct, but the parsing of the command line in csh requires that the
> \t in the arg be protected with quotes.  (I don't normally spend any
> longer in csh than it takes for a .cshrc to launch bash, and even that's
> only on systems where I don't control /etc/passwd to just use bash
> directly.)

Thanks.  I should have tried double quotes.  That works.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: csh builtin command problems

2012-05-14 Thread Ian Lepore
On Wed, 2012-05-09 at 21:34 -0400, Robert Simmons wrote:
> I'm trying to use sysv style echo in /bin/csh and I've hit a wall as
> to how to get it to work.
> 
> The following does not have the outcome that I'm looking for:
> 
> # echo_style=sysv
> # echo test\ttest > test
> # cat test
> testttest
> 
> I want this:
> 
> # echo test\ttest > test
> # cat test
> testtest
> 
> Any thoughts?

What I see on 8.3 is this:

% set echo_style=sysv
% echo test\ttest
testttest
% echo "test\ttest"
testtest
% 

So it seems from this very minimal test that the implementation of echo
is correct, but the parsing of the command line in csh requires that the
\t in the arg be protected with quotes.  (I don't normally spend any
longer in csh than it takes for a .cshrc to launch bash, and even that's
only on systems where I don't control /etc/passwd to just use bash
directly.)

-- Ian


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: csh builtin command problems

2012-05-10 Thread Robert Simmons
On Thu, May 10, 2012 at 2:02 PM, Dieter BSD  wrote:
> Robert writes:
>> I want this:
>>
>> # echo test\ttest > test
>> # cat test
>> test    test
>
> I have given up on using echo for anything the least bit fancy,
> in favor of printf(1) which gives much better control.
>
> printf "test\ttest\n"

I understand, but can anyone verify that what I was doing is correct
as far as the man page, and that it is not working on your 9.0 box as
well?
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: csh builtin command problems

2012-05-10 Thread Dieter BSD
Robert writes:
> I want this:
>
> # echo test\ttest > test
> # cat test
> test    test

I have given up on using echo for anything the least bit fancy,
in favor of printf(1) which gives much better control.

printf "test\ttest\n"
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"