for ip in 192.168.10.{1,2,3..254};do ping -c 1 $ip;done
Welcome to my page. I am not an avid writer, but i am trying. Here you will find some of the fine snippets i came across which i would like to revisit given a chance. Some of the technical troublshooting which i encountered, which i would like to maintain here as ready reckoner. Please feel free to go around my pages. Bouquets and Brickbats are welcomed. :-)
Tuesday, November 11, 2014
Tuesday, January 28, 2014
Shell - List number of lines once the search pattern matches
awk '/PATTERN/ {for(i=1; i<=5; i++) {getline; print}}' filename
The above command will search the key word "PATTERN" once it is matched, it will print the below 5 lines after the search string from the text file.
The above command will search the key word "PATTERN" once it is matched, it will print the below 5 lines after the search string from the text file.
Subscribe to:
Posts (Atom)