假设我想将“jumped”一词后面的第一个单词大写。下面的例子
原文:
the cow jumped over the moon
Run Code Online (Sandbox Code Playgroud)
修改案文
the cow jumped OVER the moon
Run Code Online (Sandbox Code Playgroud)
我尝试过 awk 和 sed 但似乎无法正确执行。
提前致谢
我正在尝试从 Discover(KDE 等离子商店)在 Ubuntu 19.04 上安装 InkScape,但它显示错误:
Dependencies resolution failed
Run Code Online (Sandbox Code Playgroud)
我尝试从 PPA 安装它
sudo add-apt-repository ppa:inkscape.dev/stable
sudo apt install inkscape -y
Run Code Online (Sandbox Code Playgroud)
但它仍然显示未满足的依赖项。未满足此包或依赖项。
The following packages have unmet dependencies:
inkscape : Depends: libpoppler82 (>= 0.71.0) but it is not installable
Recommends: python-uniconvertor but it is not installable
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
如何安装它,我找不到任何解决方案。任何帮助将不胜感激。
$ ls -lh file1.tar
-rw-r--r-- 1 wnice wnice 40K Aug 6 20:41 file1.tar
$ du -sh file1.tar
80K file1.tar
Run Code Online (Sandbox Code Playgroud)
为什么它显示相同文件的不同大小?请帮我理解
我试图if statement在 bash 中学习,但它显示未找到错误命令
#! /bin/bash
count=10
if [$count -eq 10 ]
then
echo "true"
fi
Run Code Online (Sandbox Code Playgroud) #!/bin/bash
cd /pg
file=`ls -l |awk '{print $9}'`
list=()
for i in $file
do
echo $i
a=`cat /pg/$i | head -n 1 |awk '{print $8}'`
b=`cat /pg/$i | head -n 2 |awk '{print $8}'`
#a1=`echo "$a" | tr -d '"'`
#b1=`echo "$b" | tr -d '"'`
echo $a
echo $b
c="$(($a+$b))"
list=($c)
#a1=`cat /pg/$i | head -n 2 |awk '{print $8}'`
done
Run Code Online (Sandbox Code Playgroud)
在执行上面的代码时,我收到以下错误,请帮助我解决值的问题输出是a=30,b=30但仍然无法添加两者。
/bin/max_timetrack.sh: line 16: 30+30
30: syntax error in expression (error token is "30")
Run Code Online (Sandbox Code Playgroud)