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 ing
That only works with compound commands.
bash-5.2$ foo() if :; then echo hi; fi
bash-5.2$ foo
hi
https://www.gnu.org/software/bash/manual/html_node/Shell-Functions.html
--
vq