DTS Engineer, I inserted your code into the Script Editor and an error occurred. I have High Sierra (10.13.6).
Post
Replies
Boosts
Views
Activity
eskimo, can you write what it will look like for the "test" command? I asked a specific question in the first message, not a general one.
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.
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 $?
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.
Yes, there is no such problem in Safari.
The problem is in Google Chrome.
On Mac OS, the same problem. I don't know why you don't have this problem.
red_menace, I use Windows to view the help.
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, 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.
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 '.
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?
eskimo, if there are quotes in the text ", then an error occurs.
There can be any characters in my text.
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$'
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: \.