
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] "How to"
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
> 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
> Another trick I use is to define a function. Unfortunately bash
> doesn't recognize open brace as a line continuation syntax, but that's
> a minor thing.
Not sure to understand again:
$ myfunc() {
> echo $1
> }
$ myfunc abc
abc
br.
--
2 + 2 = 5, for very large values of 2.
Home |
Main Index |
Thread Index