[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Q re: if test of command in bash script



On Tuesday 28 October 2008 02:28:16 pm Ken Irving wrote:
>On Tue, Oct 28, 2008 at 01:57:40PM -0500, Kent West wrote:
>> Ken Irving wrote:
>> >             echo -e "YES, '$targetDir exists!\n\n"
>>
>> Ah, the "-e" enables things like newlines and the bell character.
>
>I use it a lot (but I think just needed one \n above), and often without
>quoting the whole thing, e.g.,
>
>    echo -e \\nleading blank line to separate output from previous lines

Yeah, but echo may or may not support '-e' (or any options) depending on your 
shell and utilities installed.  If you need portable C-style escapes, use 
printf.
-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss03@volumehost.net                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: