Shell
Stainky
我有一个梦想... ...
展开
-
Shell脚本的运行
编写脚本:#!/bin/basha=Hello;b=world;echo "$a $b!";保存为test.sh.两种方式启动:1.相对路径:sh test.sh2.绝对路径:sh /home/uses/test.sh原创 2013-12-07 19:54:27 · 589 阅读 · 0 评论 -
Shell: let:not found
let:not found原因:It's because Ubuntu uses the dash shell as default and doesn't always recognize when you try to set the shell in a script. Even if you enter "echo $SHELL" into the console it will te原创 2013-12-07 21:52:21 · 702 阅读 · 0 评论 -
自定义文件描述符
0:stdin1:stdout2:stderr3:只读模式 4:截断模式 >5:追加模式 >>eg:只读模式:$ echo this is the test line > test.txt$ exec 3$ cat test.txt(每次读取都需要重新分配文件描述符)截断模式:$ exec 4>test.txt原创 2013-12-09 21:54:08 · 962 阅读 · 0 评论