Author Topic: Silly Korn Shell Question  (Read 1839 times)

ABlipInContinuity

Silly Korn Shell Question
« on: 08 July, 2008, 12:19:07 am »
For neatness sake, I want to make a shell script command span multiple lines so that it's easy to read back by anyone updating a script in future.

How do I do this?

I thought the following would do the trick:

Quote
echo Hello
  \ World


Re: Silly Korn Shell Question
« Reply #1 on: 08 July, 2008, 12:22:55 am »
Code: [Select]
echo Hello \
World
"Yes please" said Squirrel "biscuits are our favourite things."

Maladict

Re: Silly Korn Shell Question
« Reply #2 on: 08 July, 2008, 12:23:59 am »
This belongs in Blinkenlighs, but you need to end the line with a backslash, your example seems to have the backslash in the wrong place?

i.e. your example should be

echo Hello \
World


Maladict

Re: Silly Korn Shell Question
« Reply #3 on: 08 July, 2008, 12:24:44 am »
Beaten by Greenbank as usual.  ;D

ABlipInContinuity

Re: Silly Korn Shell Question
« Reply #4 on: 08 July, 2008, 12:25:21 am »
I worked it out msyelf before coming back to this thread.

The problem was between the chair and the machine.

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Silly Korn Shell Question
« Reply #5 on: 08 July, 2008, 07:28:41 am »
A temporary PEBKAC is far better than a UTSF any day.

My questions almost always end up as WORBDIK

..d
"By creating we think. By living we learn" - Patrick Geddes