在vim中使用shell命令的方法以及foreach循环的使用.
2017-08-30 18:45
627 查看
在vim中使用shell命令的方法
程序:
make结果:
foreach循环的使用
程序:
make结果:
程序:
.PHONY:all clean $(shell mkdir -p s1/s2) #使用shell命令新建两个级联文件夹 all: @echo "hello world" clean: rm -r s1 s2
make结果:
root@ubuntu:~/lesson/chap2/2-5/2-5-3/shell# ls makefile root@ubuntu:~/lesson/chap2/2-5/2-5-3/shell# make hello world root@ubuntu:~/lesson/chap2/2-5/2-5-3/shell# tree . ├── makefile └── s1 └── s2 2 directories, 1 file root@ubuntu:~/lesson/chap2/2-5/2-5-3/shell#
foreach循环的使用
程序:
A=1 3 5 7 9 B=$(foreach i,$(A),$(addprefix 0.,$(i)))#foreach中加前面修饰 C=$(foreach i,$(A),$(addsuffix .0,$(i)))#foreach中加后面修饰 all: @echo "A=$(A)" @echo "B=$(B)" @echo "C=$(C)"
make结果:
root@ubuntu:~/lesson/chap2/2-5/2-5-3/foreach# make A=1 3 5 7 9 B=0.1 0.3 0.5 0.7 0.9 C=1.0 3.0 5.0 7.0 9.0 root@ubuntu:~/lesson/chap2/2-5/2-5-3/foreach#
相关文章推荐
- Linux系统环境变量文件(/etc/profile)设置后无法使用vim、vi等命令原因以及解决方法
- shell的date命令:使用方法,以及小时、分钟的计算
- shell的date命令:使用方法,以及小时、分钟的计算
- Windows使用SSH Secure Shell实现免密码登录Linux的方法以及使用scp2命令免密码下载文件
- shell的date命令:使用方法,以及小时、分钟的计算
- 【Nikki积累-shell】diff命令的使用方法
- 在linux应用程序使用system函数执行简单的shell交互命令的方法
- 【方法】_(Web网页版+GitHub For Windios客户端+Shell命令)_简单使用GitHub--克隆-上传-同步变化
- shell中cut命令的使用方法
- Java学习之容器上(Collection接口常用方法,Iterator接口,使用foreach循环遍历Collection集合元素,Set集合通用知识(Hashset类,hashcode()与LinkedHashSet类))
- Shell 命令的详细使用方法。
- SHELL 循环获取日期以及FOR使用
- shell 里把命令的输出赋给变量 以及变量的使用
- linux下更改root用户的密码 以及VIM编辑器使用命令 :q,:x :w :q!
- 使用Dreamhost空间下Shell命令的使用方法
- shell: find命令的使用方法
- php的smarty的foreach以及section循环方法!
- awk中使用shell命令的方法
- linux中压缩和解压缩的命令以及使用方法
- shell scripts for 循环中变量赋值 以及 shell中sed的使用