mirror of
https://github.com/54shady/kernel_drivers_examples.git
synced 2025-08-11 23:32:00 +00:00
cat all files under a directory
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
# 查看目录下每个文件的内容
|
||||
# shell测试脚本(android ksh)
|
||||
|
||||
## 查看目录下每个文件的内容
|
||||
|
||||
有下面这样一个目录
|
||||
|
||||
@ -58,3 +60,15 @@ done
|
||||
(( i+= 1 ))
|
||||
done
|
||||
```
|
||||
|
||||
## 查看某个目录下所有的文件的内容
|
||||
|
||||
```shell
|
||||
for f in `ls`
|
||||
do
|
||||
if [ -f $f ]
|
||||
then
|
||||
echo "$f =" `cat $f`
|
||||
fi
|
||||
done
|
||||
```
|
||||
|
Reference in New Issue
Block a user