小编Pet*_*ter的帖子

如何压缩命令的错误信息?

如何禁止shell命令的错误消息?

例如,如果jpg目录中只有文件,则运行ls *.zip会显示错误消息:

   $ ls *.zip
   ls: cannot access '*.zip': No such file or directory
Run Code Online (Sandbox Code Playgroud)

有没有选项可以抑制此类错误消息?我想在bash脚本中使用此命令,但我想隐藏所有错误.

linux bash

35
推荐指数
3
解决办法
4万
查看次数

如何使用 Bootstrap 4 在页面加载后禁用加载器/微调器?

I\xe2\x80\x98ve 使用 Bootstrap 4 创建了一个包含数据表的页面。在某些情况下,表非常大,数据检索需要几秒钟。因此,我\xe2\x80\x98ve 添加了一个微调器/加载器,显示页面仍在加载。但是,当页面完全加载时,微调器不会按预期停止,并且我在文档中找不到如何实现此操作的注释。我是否错误地使用了“div”元素,或者我是否需要 JavaScript?- 不幸的是我对 JavaScript 的了解为 0%。或者这是浏览器/操作系统特定的问题?(我使用的是 Firefox / Linux)。

\n\n

\r\n
\r\n
<!doctype html>\r\n<html lang="en">\r\n  <head>\r\n    <!-- Required meta tags -->\r\n    <meta charset="utf-8">\r\n    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">\r\n\r\n    <!-- Bootstrap CSS -->\r\n    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">\r\n\r\n    <title>Hello, Table!</title>\r\n  </head>\r\n  <body>\r\n    \r\n    <div class="container">\r\n    \r\n      <div class="pt-3">\r\n\t\t\t\t<span class="h1 mr-3">Large Table</span>\r\n\r\n      <div class="spinner-border text-primary" role="status">\r\n  <span class="sr-only">Loading...</span>\r\n</div>\r\n      </div>\r\n    \r\n    \r\n    <div class="table-responsive pt-3">\r\n \r\n        <table class="table table-hover">\r\n  <thead class="thead-dark">\r\n    <tr>\r\n      <th scope="col">Column 1</th>\r\n      <th scope="col">Column 2</th>\r\n …
Run Code Online (Sandbox Code Playgroud)

html css beautifulsoup

3
推荐指数
1
解决办法
2万
查看次数

如何将两个搜索词与"grep"(AND)组合

使用grep,我可以在本地文件夹中的50个文件中找到一个单词,即:

grep -i "hello" *.html
Run Code Online (Sandbox Code Playgroud)

但是如何找到包含两个单词的文件?示例:我想查找包含Word"hello"和单词"peter"的所有文件.我怎样才能结合两个grep?

linux grep

2
推荐指数
1
解决办法
3227
查看次数

如何选择非数字行

如何在 MySQL 中选择非数字的行?

 SELECT * 
 FROM `TABLE`
 WHERE `Column_B` <> Number
Run Code Online (Sandbox Code Playgroud)

我知道,这是一个愚蠢的问题,但我还没有找到解决方案。Column_B 是 varchar(3)。

mysql select numbers where-clause

2
推荐指数
1
解决办法
8405
查看次数

为什么 echo 命令解释基目录的变量?

我想在图片文件夹中找到一些文件类型,我在文件夹中创建了以下 bash 脚本/home/user/pictures

for i in *.pdf *.sh *.txt;
do
  echo 'all file types with extension' $i;
  find /home/user/pictures -type f -iname $i; 
done
Run Code Online (Sandbox Code Playgroud)

但是当我执行 bash-script 时,对于位于基本目录 /home/user/pictures. 而不是 echo 'All File types with Extension *.sh' 该命令解释基目录的变量:

all file types with extension file1.sh
/home/user/pictures/file1.sh
all file types with extension file2.sh
/home/user/pictures/file2.sh
all file types with extension file3.sh
/home/user/pictures/file3.sh
Run Code Online (Sandbox Code Playgroud)

我想知道为什么 echo - 命令不打印“所有带有扩展名 *.sh 的文件类型”。

linux bash shell echo

0
推荐指数
1
解决办法
125
查看次数

标签 统计

linux ×3

bash ×2

beautifulsoup ×1

css ×1

echo ×1

grep ×1

html ×1

mysql ×1

numbers ×1

select ×1

shell ×1

where-clause ×1