9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Alex Musolino <alex@musolino.id.au>
To: 9front@9front.org
Subject: Re: [9front] git on labs distribution
Date: Tue, 28 Jan 2020 10:02:49 +1030	[thread overview]
Message-ID: <CCF6BE2A4995E9BF254DBDCC0F870B46@musolino.id.au> (raw)
In-Reply-To: <f2e462611680f9ec02e673859f79132e@quintile.net>

> the other issue is the use of `$nl{ cmd } in rc(1) scripts.
> the shell parser doesn't like this and I cannot see what it
> is designed to do. Can someone explain?

 From the 9front man page:

	`{command}
	`split {command}
		rc executes the command and reads its standard output,
		splitting it into a list of arguments, using characters
		in $ifs as separators.  If $ifs is not otherwise set,
		its value is ' \t\n'.  In the second form of the com-
		mand, split is used instead of $ifs.

The use of $nl (containing a literal newline) avoids having to
place extraneous quotes, escapes, and LFs throughout a script.

The man page is a little misleading here, I feel.  Setting
ifs=' \t\n' doesn't do what it seems to imply.  You actually
have to include literal tab and LF characters, i.e.:

ifs=' 	
'

--
Cheers,
Alex Musolino


  reply	other threads:[~2020-01-27 23:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-27 23:20 Steve Simon
2020-01-27 23:32 ` Alex Musolino [this message]
2020-01-28  7:21 ` [9front] " ori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CCF6BE2A4995E9BF254DBDCC0F870B46@musolino.id.au \
    --to=alex@musolino.id.au \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).