shell的输入输出
来源:互联网 发布:unity3d 给模型加动画 编辑:程序博客网 时间:2024/06/05 03:29
echo
echo是文本行或变量/ 把字符串输入到文件
echo [option] string-e 解析转义字符、-n 不换行,默认echo内容后跟一个回车换行
python@ubuntu:5$ echo "dimples\n\n"dimples\n\npython@ubuntu:5$ echo -e "dimples\n\n"dimplespython@ubuntu:5$
管道 |
把一个命令的输出传递给另一个命令做输入
cat file | movels -l | grep "file"
tee
- 相当于把-l后的数据写入到a.txt里面
ls -l | tee a.txt
文件重定向
cmd > file 输出重定向到新文件cmd >> file 追加 (a+:文件不存在创建)cmd > file 2>&1 出错(2)也重定向到1所指向的文件里cmd < file1 > file2 输入输出都重定向到文件里cmd < &fd 把文件描述符fd作为标准输入cmd > &fd 作为输出。。cmd < &- 关闭标准输入
函数
- 没有返回值
- 没有参数列表
- 可以传参 $0代表程序名
阅读全文
0 0
- shell的输入输出
- shell的输入输出重定向
- shell 输入输出
- shell输入输出
- shell 输入输出
- shell--输入输出
- Shell输入输出
- linux shell下的输入输出重定向
- Linux 下的 shell 编程之 输入输出
- linux下的shell输入输出重定向
- [shell]shell输入输出重定向
- shell输入输出和环境变量
- shell 输入输出(转发)
- shell 输入输出脚本
- shell脚本中的输入输出
- shell输入输出重定向
- Shell输入输出重定向
- (3) Shell 输入输出
- 类中引入的实体类报错(出现大量红线)
- 1. 策略模式
- 对象保护计数类
- deleted object would be re-saved by cascade (remove deleted object from asso错误
- Windows下python连接、操作oracle数据库(cx_Oracle)
- shell的输入输出
- Java中 3*0.1 == 0.3 返回值 false ,1*0.3 == 0.3 返回值 true
- HDU
- 我用过的计算机
- SpringBoot学习(四)——WEB开发
- linux操作系统
- Hive DDL & 内部表与外部表
- caffe源码 链式法则
- caffe源码 全连接层