zsh-users
 help / color / mirror / code / Atom feed
* special characters in file names issue
@ 2023-11-09 23:16 Jim
  2023-11-10  5:04 ` Mikael Magnusson
  2023-11-10  9:50 ` Roman Perepelitsa
  0 siblings, 2 replies; 15+ messages in thread
From: Jim @ 2023-11-09 23:16 UTC (permalink / raw)
  To: zsh

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

Hi everyone,

Using scripts, looking to cleanup duplicate files even if named differently.
The issue I ran into is when a file path contains parentheses. '(' or ')'

Example File Name:  Wallpapers/Web_downloads/05 (1).jpg

The following is part of an anonymous function:

local E
local -a AllFileNames
local -A FileNameCkSum
...
for E (${(@)AllFileNames}) {
[[ -v FileNameCkSum[$E] ]] || FileNameCkSum[$E]=${$(shasum -a 1 $E)[1]} }
# line that fails
...

AllFileName contains the result of a glob statement.

Error Message:  (anon):<line no>: invalid subscript

I'm sure this is a quoting issue, but everything I've tried so far has
failed.

If someone could point me to documentation or examples it would be
appreciated.

Regards,

Jim Murphy

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

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

end of thread, other threads:[~2023-11-12  0:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-09 23:16 special characters in file names issue Jim
2023-11-10  5:04 ` Mikael Magnusson
2023-11-10  9:50 ` Roman Perepelitsa
2023-11-10 14:17   ` Mikael Magnusson
2023-11-10 14:28     ` Roman Perepelitsa
2023-11-11 18:26     ` Jim
2023-11-10 16:33   ` Lawrence Velázquez
2023-11-10 17:02     ` Bart Schaefer
2023-11-10 20:37     ` Roman Perepelitsa
2023-11-11  0:13       ` Bart Schaefer
2023-11-11 17:18         ` Ray Andrews
2023-11-11 18:19           ` Bart Schaefer
2023-11-11 18:52             ` Ray Andrews
2023-11-11 18:26   ` Jim
2023-11-12  0:08     ` Bart Schaefer

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).