[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
function that prints each argument on a new line
From: |
lisa-asket |
Subject: |
function that prints each argument on a new line |
Date: |
Tue, 6 Jul 2021 14:29:41 +0200 (CEST) |
From: Greg Wooledge <greg@wooledge.org>
To: help-bash@gnu.org
Subject: Re: function that prints each argument on a new line
Date: 06/07/2021 13:54:01 Europe/Paris
On Tue, Jul 06, 2021 at 01:40:46PM +0200, lisa-asket@perso.be wrote:
> Would like to have a function that prints a number of lines by passing them
> as arguments.
f() { printf '%s\n' "$@"; }
I thought I would have to repeat the format `$#` times. Is that not so?