zsh-users
 help / color / mirror / code / Atom feed
* Counting characters in command output?
@ 2024-02-13 20:38 Mark J. Reed
  2024-02-13 20:41 ` Roman Perepelitsa
  0 siblings, 1 reply; 22+ messages in thread
From: Mark J. Reed @ 2024-02-13 20:38 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

I thought this would give me the length of the string, but it seems to be
counting words instead:

     zsh% echo ${#$(echo hello)}
     1

Is this a bug? I thought I'd need a modifier flag to treat output as an
array and give me  a word count, while character count would be the default.

-- 
Mark J. Reed <markjreed@gmail.com>

[-- Attachment #2: Type: text/html, Size: 701 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2024-02-16 21:07 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 20:38 Counting characters in command output? Mark J. Reed
2024-02-13 20:41 ` Roman Perepelitsa
2024-02-14  0:45   ` Mark J. Reed
2024-02-14  6:49     ` Roman Perepelitsa
2024-02-14 13:56       ` Mark J. Reed
2024-02-14 15:36       ` Ray Andrews
2024-02-14 15:58         ` Mark J. Reed
2024-02-14 16:30           ` Ray Andrews
2024-02-15 14:34             ` Lawrence Velázquez
2024-02-15  9:50         ` Roman Perepelitsa
2024-02-15 14:30           ` Lawrence Velázquez
2024-02-15 15:29             ` Ray Andrews
2024-02-15 16:16               ` Roman Perepelitsa
2024-02-15 16:55                 ` Ray Andrews
2024-02-15 14:53           ` Ray Andrews
2024-02-16  1:53       ` Bart Schaefer
2024-02-16  4:53         ` Lawrence Velázquez
2024-02-16 18:03           ` Bart Schaefer
2024-02-16 18:38             ` Mark J. Reed
2024-02-16 19:36               ` Bart Schaefer
2024-02-16 19:37             ` Lawrence Velázquez
2024-02-16 21:06               ` Mikael Magnusson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).