sed command regex example
In this tutorial, To use sed command regex such as: Lines starting from A till B printed, how to print between A line to B line , so on.
Lines starting from 10 line till 15 line printed
sed command regex example
The content sed_test file as picture below:Lines starting from 10 line till 15 line printed
[huupv@huupv ~]$ sed -n '10,12p' sed_testThe output as below:
10 operator:x:11:0:operator:/root:/sbin/nologinHow to Lines starting from 10 line till end line printed
11 games:x:12:100:games:/usr/games:/sbin/nologin
12 ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
[huupv@huupv ~]$ sed -n '10,$p' sed_testThe output as picture below:
Comments
Post a Comment