我正在尝试从 source-1.4.3-linux.tgz (已下载,因此我无法控制名称)构建 rpm,并将文件解压到目录 source-1.4.3-linux 中。在我的 source.spec 文件中,我有
Name: source
Version: 1.4.3
Run Code Online (Sandbox Code Playgroud)
所以我收到错误可能是很合乎逻辑的:
cd: source-1.4.3: No such file or directory.
Run Code Online (Sandbox Code Playgroud)
我尝试将 -linux 添加到版本中,但 rpmbuild 只需要一个数字。我需要做什么才能告诉 rpmbuild 源文件已解压到 source-1.4.3-linux 中?
我从一个关联数组和 2 个 awk 文件开始,我可以看到我的问题。如果有重复记录,我只得到 1 个结果。但我原以为结果会是斗牛犬覆盖梗犬。为什么我会得到这个结果?
我的 file1.tsv 是:
cat siamese
dog terrier
dog bulldog
snake python
Run Code Online (Sandbox Code Playgroud)
file2.tsv 是:
A barking dog never bites.
A cat has nine lives.
A bird in the hand is worth two in the bush.
Run Code Online (Sandbox Code Playgroud)
我当前的脚本是:
FILE1="./file1.tsv"
FILE2="./file2.tsv"
awk '
BEGIN {FS = OFS = "\t";}
NR == FNR {kw[$1] = $2; next}
{
n = split(tolower($1), words, /[[:blank:]]|\.|,/)
for (i = 1; i <= n; i++) {
if (words[i] in kw && length(words[i]) …Run Code Online (Sandbox Code Playgroud)