摘要:
Shell 获取参数的方式写shell脚本的时候,往往需要从外部获取参数,例如:$ sh demo.sh a那么如何将上面的参数a传到shell程序里面呢。 最常用的是,$0 $1... $10,这些位置变量 其中$0是shell程序的名字,$1,$2...分别为第一个参数,第二个参数... 我们d... 阅读全文
摘要:
Linux 常用命令 -- find根据名字,顾名思义就是查找的意思,可以通过多个维度来查找你想要的文件,比如类型,find - search for files in a directory hierarchy常用用法1. 通过名字查找文件find pathname -name filename2... 阅读全文
摘要:
Linux shell 读取一行方法一通过指定IFS--Internal Field Separator,IFS默认情况下是,可以下脚本中设定IFS值DEMO 1$cat t1.txt abcfd $cat test_IFS.sh #! /bin/shIFS="c"for LINE in `ca... 阅读全文