Mailinglist Archive: opensuse (686 mails)

< Previous Next >
Re: [opensuse] shell script help
On 2013-07-08 08:29 (GMT-0400) Anton Aylward composed:

Felix Miata wrote:

I don't
understand why -d: -f2 works. The -d: part I sort of get, but not why 2 and
not 1 after -f.

Because you want the second field.

Of course that's what a 2 would mean, but....

it goes <field> <delimiter> <field> [ <delimiter> <field> .... }

so you have

hostname : 0.0
field delimiter field

field #1 is the hostname
field #2 is the screen number

The real question is "Why is this not zero indexed?"

Why should anything humans use be zero indexed? The first thing we count is the first thing we count, 1, not zero. Zero means zilch, nothing, nada, less than one thing.

The real question is what does hostname have to do with anything (aka how does :0 get to be a second field):

# echo $DISPLAY
:0

???
--
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata *** http://fm.no-ip.com/
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >