exec

简介:
[root@localhost ~]# ./b.sh 
a
1
b
2
c
3
[root@localhost ~]# less b.sh 
#!/bin/sh
exec < b
zcc()
{
    echo $1
    echo $2
}
while read line
do
  zcc $line
done
[root@localhost ~]# less b
a 1
b 2

c 3



本文转自 freeterman 51CTO博客,原文链接:http://blog.51cto.com/myunix/1332342,如需转载请自行联系原作者

相关文章
|
4月前
|
Unix Shell Linux
5-15|Docker报错OCI runtime exec failed: exec failed: unable to start container process: exec: “/bin/ba
5-15|Docker报错OCI runtime exec failed: exec failed: unable to start container process: exec: “/bin/ba
|
Docker 容器
docker run 报错“Container XXX is restarting, wait until the container is running“
docker run 报错“Container XXX is restarting, wait until the container is running“
617 0
|
Kubernetes Shell 容器
starting container process caused “exec: \“/bin/bash\“: stat /bin/bash: no such file or directory
starting container process caused “exec: \“/bin/bash\“: stat /bin/bash: no such file or directory
270 0
|
Unix Java Linux
Runtime.exec方法之获取process id
Runtime.exec方法之获取process id
230 0
|
Shell C++
C++中的exec()函数
exec()函数在C++中是一个进程控制函数,用于创建新进程执行其他程序或命令行指令。exec()函数可以替换当前进程的代码和数据,创建新的进程运行其他程序。exec()函数有多个版本,例如execl、execv、execle、execve等,根据不同的参数类型和个数来使用。
190 0
|
NoSQL MongoDB 数据安全/隐私保护
OCI runtime exec failed: exec failed: unable to start container process: exec: "mongo": executable file not found in $PATH: unknown
OCI runtime exec failed: exec failed: unable to start container process: exec: "mongo": executable file not found in $PATH: unknown
1170 0
OCI runtime exec failed: exec failed: unable to start container process: exec: "mongo": executable file not found in $PATH: unknown
|
物联网 Linux 开发者
Exec 之后文件描述特点|学习笔记
快速学习 Exec 之后文件描述特点
|
Ubuntu Linux 应用服务中间件
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "ip": executable file not found in $PATH: unknown (Docker容器没有ip addr命令:exec ip addr 报错)
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "ip": executable file not found in $PATH: unknown (Docker容器没有ip addr命令:exec ip addr 报错)
3784 0
|
Windows 关系型数据库 PostgreSQL