Mailing List Archive


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

Re: [tlug] "How to"



Bruno Raoult writes:
 > On Tue, May 13, 2014 at 5:49 AM, Stephen J. Turnbull <stephen@example.com> wrote:
 > > Ctrl-V <RET> is a useful trick in bash, at least (bash treats it like a
 > >  semicolon AFAICT).
 > 
 > Same as here???
 > 
 > $ echo foo^Mecho bar
 > echo bar
 > $ echo foo; echo bar
 > foo
 > bar

No, I was talking about in the context of a code block (such as a loop
or a function body).  I think it looks better than a long line broken
by colons.  I don't see when it would be useful for standalone
commands.

 > > Splitting lines with \ <RET> is also occasionally
 > > useful (but I forget how it interacts with things like strings).
 > 
 > Easy: It just escapes nest character special meaning:
 > $ echo foo\
 > > bar
 > foobar

That's not a string.  I'm talking about the things bounded by pairs of
" or '.

 > Not sure to understand again:
 > 
 > $ myfunc() {
 > > echo $1
 > > }

I'm not sure what happened there.  I tried it again, and you're right,
it does treat it as continuation.



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links