我需要:
通过在Linux上使用命令行 - openSUSE.我创建了CA证书:
# openssl genrsa -out rootCA.key 2048
Generating RSA private key, 2048 bit long modulus
..........................................................+++
....................+++
e is 65537 (0x10001)
# openssl req -x509 -new -nodes -key rootCA.key -days 3650 -out rootCA.pem
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you …Run Code Online (Sandbox Code Playgroud) 我正在像这样创建我的证书:
openssl genrsa -out rootCA.key 2048
openssl req -x509 -new -key rootCA.key -sha512 -days 36501 -out rootCA.pem \
-extensions v3_req
openssl genrsa -out client1.key 2048
openssl req -new -key client1.key -sha512 -days 36500 -out client1.csr \
-extensions v3_req
openssl x509 -req -days 36500 -CA rootCA.pem -CAkey rootCA.key \
-CAcreateserial -CAserial serial -in client1.csr -out client1.pem
openssl verify -verbose -CAfile rootCA.pem client1.pem
openssl pkcs12 -export -in client1.pem -inkey client1.key -out client1.p12 -name "client1"
Run Code Online (Sandbox Code Playgroud)
我希望 .p12 证书使用 sha512 算法。我想过将选项 -sha512 添加到转换(最后一行),但似乎 pkcs12 …
命令:
ls /some/path/some/dir/ | grep some_mask_*.txt | wc -l
Run Code Online (Sandbox Code Playgroud)
通过bash上的ssh执行此操作时返回正确数量的文件.当我把它放入.sh脚本时
iFiles=`ls /some/path/some/dir/ | grep some_mask_*.txt | wc -l`
echo "iFiles: ${iFiles}"
Run Code Online (Sandbox Code Playgroud)
它总是如此0.这里有什么不对?
解决方案:
当我研究它时,我发现我的"通配符掩码"似乎是问题所在.使用grep some_mask_ | grep \.txt而不是上面的单个grep帮我解决了第一个问题.
我将答案标记为解决方案,它几乎完全描述了我犯的错误.我现在要编辑我的脚本.感谢大家.
我在两个网页上使用引导卡。在一页上,标题文本是固定的,因此我可以使用 min-height 来匹配它们的卡片标题高度。在第二页上,将生成这些卡片,因此我不知道文本长度和单词。我希望卡片标题在一行中的高度相同。
有没有办法根据一行中最大的卡片头来计算最小高度?
我已经在使用卡片组了。据我所知,这是针对整张卡的高度,我的问题是卡头。卡片一般都具有相同的高度。
例子:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="card-deck my-3 text-center">
<div class="card mb-4 box-shadow">
<div class="card-header align-items-center d-flex
justify-content-center card-header-height">
<h4 class="my-0 font-weight-normal">Lorem Ipsum Lorem Ipsum Lorem Ipsum Ipsum</h4>
</div>
<div class="card-image">
<img class="img-fluid" src="img_avatar1.png">
</div>
<div class="card-body">
<ul class="list-unstyled mt-3 mb-4">
</ul>
</div>
</div>
<div class="card mb-4 box-shadow">
<div class="card-header align-items-center d-flex
justify-content-center …Run Code Online (Sandbox Code Playgroud)我正在检查 perl 中的 ZIP-Archive 是否包含文件夹/结构是否正常。到目前为止,根目录包含一个 sourcen 目录/sourcen。RegExp^sourcen为我做了这个。
现在我有一个新案例。根目录可能在 sourcen-dir 之前包含一个子目录,因此它看起来像这样:
/sourcen
/SUBDIR/sourcen
Run Code Online (Sandbox Code Playgroud)
但它可能没有更多这样的子目录:
/SUBDIR/SUBDIR/sourcen
/SUBDIR/SUBDIR/SUBDIR/sourcen
/SUBDIR/SUBDIR/SUBDIR/SUBDIR/sourcen
...
Run Code Online (Sandbox Code Playgroud)
是否可以使用 RegExp 来验证源目录是在根目录中还是只有一个子目录“较低”?
openssl ×2
ssl ×2
bash ×1
bootstrap-4 ×1
command-line ×1
css ×1
html ×1
javascript ×1
linux ×1
perl ×1
regex ×1
shell ×1
unix ×1