001、
[root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt h d w q g d t [root@PC1 test]# sed -n "$a,$b"p a.txt ## 同时传入两个变量参数 d w q
001、
[root@PC1 test]# ls a.txt [root@PC1 test]# cat a.txt h d w q g d t [root@PC1 test]# sed -n "$a,$b"p a.txt ## 同时传入两个变量参数 d w q