gpt4 book ai didi

excel - 在 Mac 上使用终端通过 Excel 打开文件

转载 作者:行者123 更新时间:2023-12-01 19:17:35 27 4
gpt4 key购买 nike

现在,在 MacOS 终端中:我只需运行以下命令即可通过 Sublime Text 打开文件:

subl [path]

使用 Excel 时我可以做类似的事情吗?

谢谢

最佳答案

使用默认应用程序打开文件,只需

open [path]

如果想改变,可以使用

open -a [app-path] [file-path]

man open 页面(有关 -a 选项的更多信息):

DESCRIPTION
The open command opens a file (or a directory or URL),
just as if you had double-clicked the file's icon. If no application name
is specified, the default application as determined via LaunchServices is
used to open the specified files.

If the file is in the form of a URL, the file will be opened as a URL.

You can specify one or more file names (or pathnames),
which are interpreted relative to the shell or Terminal window's current
working directory.
For example, the following command would
open all Word files in the current working
directory:

open *.doc

Opened applications inherit environment variables just
as if you had launched the application directly through its full path.
This behavior was also present in Tiger.

The options are as follows:

-a application
Specifies the application to use for opening the file

关于excel - 在 Mac 上使用终端通过 Excel 打开文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47824438/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com