fork(){
i=0
count=0
while (($count<5))
do
fpfunction &
pid=$!
#Ensure the pid is available
if [ -z "$pid" ]; then
echo "IS NULL"
else
Array[$i]=$pid
echo "PID is $pid"
fi
wait [$pid]
i=$((i+1))
count=$(( count+1 ))
done
echo "PID: ${Array[*]}"
}
Run Code Online (Sandbox Code Playgroud)
fpfunction()只回显一个字符串,所以我不在这里写。
我对wait()的理解是它将等待子进程完成,然后返回一个值。
我在脚本中放入了wait(),因为我想确保所有子进程都已完成。
但是,发生错误
不是pid或有效的工作说明
我的理解错了吗?请让我知道如何解决此问题。
非常感谢。
当我读到有关数据交易的书时,
它提到一旦建立连接,两个设备都可以在事务之间进入深度睡眠状态.
我不太明白在交易过程中会发生这种情况.有谁能解释一下?
谢谢
I need to replace a file which has thousand of lines code.
In the log, it has a specific word which I want to replace this work with some other words.
Say, how to replace all "AA" to "BB" in this file?
thanks
我正在尝试使用以下命令在我的平台上构建内核源代码:
make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- generic-v8-defconfig
Run Code Online (Sandbox Code Playgroud)
但是,错误消息显示如下:
/bin/sh: 1: aarch64-linux-gnu-gcc: not found
Run Code Online (Sandbox Code Playgroud)
很明显我的笔记本电脑上没有安装这个gcc.
然后我跟着
http://www.howtoinstall.co/en/ubuntu/trusty/main/gcc-4.8-aarch64-linux-gnu/
这个要安装gcc-4.8-aarch-linux-gnu,
但是,我仍然得到相同的错误消息.
Ubuntu版本:14.04
如果你知道如何解决这个问题,请告诉我.
谢谢
我试图通过以下链接在我的ubuntu 15.04上安装oprofile:
在我在ubuntu 14.04上运行的另一台笔记本电脑上运行良好.
我可以在/ usb/bin目录下找到二进制文件.
但是,在输入apt-get命令后我不知道为什么
sudo apt-get update && sudo apt-get install oprofile
Run Code Online (Sandbox Code Playgroud)
我的ubuntu 15.04在/ usr/bin中仍然没有oprofiled&opcontrol二进制文件.
无论如何我可以检查一下吗?
谢谢
我想知道这一点,因为我有一些 BLE 设备并且想检查我是否可以使用我自己的桌面蓝牙模块玩它。
bluetooth ×2
linux ×2
bash ×1
gcc ×1
linux-kernel ×1
oprofile ×1
ubuntu ×1
ubuntu-14.04 ×1
vi ×1
vim ×1