editor in linux shell that does charactor count?
Linux for blind general discussion
blinux-list at redhat.com
Mon Sep 25 21:08:29 UTC 2017
Hi,
Indeed just a text file, since I will be placing it elsewhere. will
explore the wc option, or nano.
thanks again,
Karen
On Mon, 25 Sep 2017, Linux for blind general discussion wrote:
> On September 25, 2017, Linux for blind general discussion wrote:
>> I can use wordperfect for word count. still I am writing something
>> that requires a character limit.
>
> Tim here. Any editor that lets you write your document contents
> through an external pipe should suffice. Ed, vi/vim, and emacs all
> do (I'm not sure about Nano).
>
> In ed, you'd use
>
> ,w !wc
>
> which will give you the character, word, and line counts for the
> range (in this case, the whole document) that you piped into it.
>
> For vi/vim, you can do similarly:
>
> :%w !wc
>
> or in vim you can use "g control+g" to get the cursor location in the
> document of the form "Col 9 of 58; Line 16 of 32; Word 146 of 291;
> Byte 821 of 1625".
>
> I don't use emacs, so I can't help much there.
>
> Within Nano, you can use meta+D (possibly <esc> followed by "d") to
> return the file stats.
>
> If you just want one of the stats from "wc", you can use either the
> "-c" (characters) "-w" (words) or "-l" (lines) parameter such as:
>
> :%w !wc -c
>
> to get the character-count.
>
> Alternatively, assuming you're just editing plain-text instead of
> markup, you can save your file and just pipe it through wc:
>
> $ wc -c < mydocument.txt
>
> Hope this helps,
>
> -tim
>
>
>
>
> _______________________________________________
> Blinux-list mailing list
> Blinux-list at redhat.com
> https://www.redhat.com/mailman/listinfo/blinux-list
>
>
More information about the Blinux-list
mailing list