标签[bash]

有关为Bash命令外壳编写的脚本的问题。 对于具有错误/语法错误的shell脚本,请在此处发布之前,使用shellcheck程序(或在Web shellcheck服务器中的https://shellcheck.net)进行检查。 有关Bash交互使用的问题更可能是Super User而不是Stack Overflow上的话题。

-1
0回复
23

bash中2个字符串之间的区别

Is there a way to find the difference between 2 strings in bash?有没有办法在bash中找到2个字符串之间的区别? For example:例如: string1: walt字符串 1:沃尔特string2: walter字符串 2:沃尔
0
0回复
16

“zsh:命令未找到:expo”尽管已安装

I recently bought MacBook Pro (13-inch, 2020 i5) and downloaded expo globally, now the problem which i am facing is it keeps saying expo command not f
0
0回复
13

如何遍历linux中给定绝对路径中的每个目录?

I have a given absolute path such as: /hello/this/is/path/of/directories我有一个给定的绝对路径,例如:/hello/this/is/path/of/directories My goal is to loop through t
-1
2回复
32

从包含多行信息的文件中提取文件名的Bash命令或脚本是什么,格式为date:filename:Filestatus

I want to extract only the filenames from a file containing multiple records in the format of:我只想从包含以下格式的多条记录的文件中提取文件名:date : filename: filestatus For
1
0回复
26

无法从脚本自动推送提交

I used the following script (autoupdate.sh) to update my git repository automatically using SSH whenever I make a change to the local repository in ra
-1
0回复
30

如何在Linux中自动化包含sudo命令的bash脚本?[关闭]

Closed . 关闭。 This question needs details or clarity . 这个问题需要细节或清晰。 It is not currently accepting answers.
0
1回复
28

如何修复这个bash脚本?

I have this script here:我在这里有这个脚本:killall -q $1#turns out system already has a method for this, yey#-q because we already have a error handlingreturne
0
2回复
46

Bash创建一个字符串,如果字符串已经存在则替换它

I would like to achieve this procedure.我想实现这个程序。 I have this command: sed -i -e 's/few/asd/g' /usr/local/sbin/.myappenv This command works if in the f
0
0回复
22

为什么相同的可执行文件(谷歌单元测试可执行文件)在powershell中没有输出但在gitbash中表现良好

I've created a executable file using cmake + googletest, but the output executable output nothing on powershell.我使用 cmake + googletest 创建了一个可执行文件,但输出可
0
1回复
46

我可以在同一行中写入file.txt[重复]

This question already has answers here : 这个问题在这里已经有了答案: How to echo out things without a newline? 如何
0
0回复
31

如何将shell命令传递给vim函数并在neovim终端中执行?

Recently I've switched to neo-vim (NVIM v0.4.4) from vim.最近我从 vim 切换到了 neo-vim (NVIM v0.4.4)。 Previously in my .vimrc file I had these two remaps that
0
1回复
33

Bash,如何修复仅适用于正字段索引的数组处理?

The following is a code example of the question which numbers can be generated in an adjustable range.以下是可以在可调范围内生成哪些数字的问题的代码示例。 The range can be set
0
2回复
28

如何执行等待上一个脚本先完成的下一个脚本?

In https://squidfunk.github.io/mkdocs-material/creating-your-site/#previewing-as-you-write , there's a command that will launch my document site.在http
0
4回复
40

如何仅在一行中打印组列表,并在它们之间使用逗号?

for example this script gives me the list of groups but each group is in a line例如,这个脚本给了我组列表,但每个组都在一行中for group in `groups`
0
1回复
25

Bash重定向不适用于Rscript

I'm writing a series of jobs where output needs to be stored in centralised log file.我正在编写一系列需要将输出存储在集中日志文件中的作业。 And im using standard redirection com
-8
0回复
27

linux中如何使用test-f文件名?[关闭]

Closed . 关闭。 This question needs details or clarity . 这个问题需要细节或清晰。 It is not currently accepting answers.
0
2回复
49

每次将带有awk的时间戳放在文件的开头

I'm trying to put timestamp at the beginning of a file each time I call the awk command每次调用 awk 命令时,我都试图将时间戳放在文件的开头I have a script with some commands
0
1回复
25

`第1行:运行bash`case`函数时出现意外标记`newline'`附近的语法错误

#!/bin/bashset -edeb_folder='/home'myinstall(){ deb=$1 temp="${1%.*}" num="${temp##*.}" temp2="${temp%.*}" method="${temp2##*.}" cas
0
1回复
21

计算具有唯一名称的嵌套目录的数量

I have a mess of nested directories.我有一堆嵌套目录。 The directories I am interested to count all have different names, but the good thing is that they all h
-3
1回复
32

从包含多个json数据的文件中提取单个json数据并使其紧凑[关闭]

Closed . 关闭。 This question needs to be more focused . 这个问题需要更加集中。 It is not currently accepting answers.

1 2 3 4 5 6 7 8 9 10 下一页