Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou Newsgroups: comp.unix.shell Subject: Re: Another 'What's the diff Q" (LDo will like this) Date: Tue, 17 Sep 2024 17:38:59 +0200 Organization: A noiseless patient Spider Lines: 37 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 17 Sep 2024 17:39:01 +0200 (CEST) Injection-Info: dont-email.me; posting-host="3ff418363c2f95269617ae7ad02c98f4"; logging-data="3770214"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/m9cXIkjh8CcWpY4lV1qpR" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:prRWdgTV4HwxH87wBntT+NhrrZs= In-Reply-To: X-Enigmail-Draft-Status: N1110 Bytes: 2067 On 17.09.2024 15:10, Kenny McCormack wrote: > In article , > Janis Papanagnou wrote: > ... >>> Note that I use both constructs, as the mood suits me, but I just got to >>> thinking that maybe <<< doesn't actually add any new functionality. >> >> It's actually a restriction since it doesn't allow (e.g.) to control >> variable expansion (as is possible with escaping the tag ('EOF' in >> your example, which prevents expansion, vs. unquoted/unescaped EOF ). > > Well, not really. I can always do: Ah, of course! So what remains then is only '<<<' being a one-liner shortcut and the '<<-' (plus the '<<#' in ksh) features to control indentation, I suppose. Janis > > $ cmd << EOF > $(fortune) > EOF > $ > > and/or: > > $ cmd <<< " > $(fortune) > " > $ > > Same diff, innit? >