bug-bash
[Top][All Lists]
Advanced

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

Re: Add option to just print history, with no added timestamps or line n


From: Lawrence Velázquez
Subject: Re: Add option to just print history, with no added timestamps or line numbers
Date: Sun, 24 Mar 2024 22:50:45 -0400
User-agent: Cyrus-JMAP/3.11.0-alpha0-332-gdeb4194079-fm-20240319.002-gdeb41940

On Sun, Mar 24, 2024, at 8:54 PM, Dan Jacobson wrote:
> Yes, it omits the line numbers. But leaves the "^I " separators!
>
> $ fc -l 999 1000|cat -vt
> 999^I echo invite Nerbleson for dinner
> 1000^I echo and Snordsworth too
> $ fc -ln 999 1000|cat -vt
> ^I echo invite Nerbleson for dinner
> ^I echo and Snordsworth too

This behavior is standardized by POSIX.

        When the -l option is used to list commands, the format of
        each command in the list shall be as follows:

        "%d\t%s\n", <line number>, <command>

        If both the -l and -n options are specified, the format of
        each command shall be:

        "\t%s\n", <command>

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/fc.html

-- 
vq



reply via email to

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