Re: problems with loop in bash



houghi wrote:

You should also get into the habit of using printf instead of echo
(except maybe for simple fixed strings), and quoting variables.
E.g.
printf '%s\n' "$LINK"


What is the reason for that? What I see (and what is probably wrong,
otherwise you would not sugest something else) is that the result is the
same. I never had an issue with the usage of echo.

See http://cfajohnson.com/shell/cus-faq.html#0b

--
Geoff Clare <netnews@xxxxxxxxxxxxx>


.



Relevant Pages

  • Re: Question about void pointers
    ... never found a reason to use it with scanf. ... I suppose (although printf() and scanf() are by no means mirror ... itself in a single string, we avoid any problems with funny formats. ...
    (comp.lang.c)
  • Re: On the interchangeability of (void *) and (char *) to printf()
    ... that void* and char* be passed to printf the same way. ... va_argmacro and provides a normative statement for the interchangeability ... I reach the same conclusion but for a different reason. ...
    (comp.lang.c)
  • Re: address of a statement in C
    ... However, there ren't many alternatives to printf, while there are ... many alternatives to goto. ... So there's a good reason to use a looping construct, ... The extra output could ...
    (comp.lang.c)
  • Re: Question about using ls
    ... The shell expands the arguments and printf just prints them. ... There is no reason to use ls without any options. ... internal memory in which it constructs a list of the files in the ...
    (comp.unix.shell)
  • Re: is this declaration correct
    ... but there's no good reason to do so. ... so localising its declaration will surprise your readers. ... If I saw a local declaration of printf(), ... (I did not say "confuse", ...
    (comp.lang.c)