help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing with and without newlines


From: Alex fxmbsw7 Ratchev
Subject: Re: Printing with and without newlines
Date: Sat, 13 Nov 2021 18:35:22 +0100

excepts of course not ps cause ps procsys util, sorry

On Sat, Nov 13, 2021, 18:34 Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:

> alias p=printf ps='printf %s' pn='printf %s\\n'
>
> On Sat, Nov 13, 2021, 18:10 irenezerafa via <help-bash@gnu.org> wrote:
>
>> I would like to have an option on whether to print function arguments
>> with a newline or
>> keep them on the same line.
>>
>> Currently I am using tho following, but is there a more straightforward
>> way to do this?
>> This starts printing from argument nl+1 onwards.
>>
>> case $nwline in
>> 1) printf '%s\n' "${@:nl+1}" ;;
>> *) printf '%s' "${@:nl+1}" ;;
>> esac
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]