|
From: | Chet Ramey |
Subject: | Re: how to define functions as one cmd without brackets |
Date: | Wed, 1 Mar 2023 19:14:27 -0500 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 |
On 3/1/23 4:42 PM, Lawrence Velázquez wrote:
On Wed, Mar 1, 2023, at 4:38 PM, alex xmb ratchev wrote:.. just few days ago i think here was someone with such functions f() cmd ; i tried that in the scp script , and in terminal , cant such i tried smth() return 1 ; and similiar less shell keyword ingThat only works with compound commands.
This is the way POSIX specifies it. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_05 -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
[Prev in Thread] | Current Thread | [Next in Thread] |