ssmith_c, I used shell command "find". You don't know how to do what I need using shell command "find"?
application "Finder" returns the result in a very strange way, for example: folder ... of folder ... of folder ... of folder ... of folder ...
Post
Replies
Boosts
Views
Activity
Quote:
You asked about AppleScript
I'm just a user and I haven't figured out the terms yet: I don't understand where AppleScript is, where AppleScript isn't. And what is the name of what you proposed?
I found such a regular expression on the Internet, which is used in -iregex:
'./[^~][^/]\.xlsm$'
What does it mean?
Why do I need this: [^~]
Why you need this: [^/]
Here's why the first slash is needed: \.
Quote:
That depends on whether you pass in the -E flag. See the find man page.
On the find man page for the -regex and -regex parameters, here is the information:
-regex pattern
True if the whole path of the file matches pattern using regular
expression. To match a file named './foo/xyzzy', you can use
the regular expression './[xyz]' or './foo/.', but not
'xyzzy' or '/foo/'.
-iregex pattern
Like -regex, but the match is case insensitive.
P.S. This forum modifies forum posts so that symbols disappear. There is a double left slash in this expression, and the forum deleted one slash and only one slash remained: './[^~][^/]\. xlsm$'
eskimo, if there are quotes in the text ", then an error occurs.
There can be any characters in my text.
Is this a file system path? Or something else?
It's just text that needs to be written inside a text file. The text can be anything, even hieroglyphs.
A common everyday task: to write something to a text file. What surprises you here, I can't understand. Have you never written anything to a file in your life?
The thing that confused me here is your reference to do shell script.
I just don't understand AppleScript and don't understand what it's called. I write a script using Google - what I find, I write, I don't understand what is called in AppleScript and why it is needed.
write does not change the content of the text? Other commands, for example, printf, echo delete apostrophes '.
red_menace, thank you, there is such a thing for TextEdit, but I'm busy with other things right now and I don't know if I can figure it out.
And what about this question:
does the recording not change the content of the text? Other commands, for example, printf, echo delete apostrophes '.
red_menace, I use Windows to view the help.
On Mac OS, the same problem. I don't know why you don't have this problem.
Yes, there is no such problem in Safari.
The problem is in Google Chrome.
endecotp, yes, I know about “man”. Is it possible to see all possible commands using "man"?
Now I know how to view information for one specific command.
eskimo, I copied this line to the Script Editor, the Script Editor returned an error: An unknown marker, and highlighted the "%" sign.
% test -d "MyDir" ; echo $?
eskimo, But I need the code specifically for the Script Editor, because I plan to write scripts that will consist of several lines, not one. In the first message, I asked a question, can you give an answer to it, taking into account the Script Editor.