Search Results

Search: Posts Made By: nitj
16,565
Posted By alister
The following will only print the second line...
The following will only print the second line after a line containing a field that's an exact match:

awk '{for (i=1; i<=NF; i++) if (s==$i) {getline; getline; print; next}}' s="${i%.*}" file
...
16,565
Posted By tukuyomi
~/unix.com$ awk -v var='( |^)a:2( |$)'...
~/unix.com$ awk -v var='( |^)a:2( |$)' '$0~var{getline x;getline;print x RS $0}' file
a
b
~/unix.com$ grep -A2 '\( \|^\)a:2\( \|$\)' file
b:2 a:2
a
b
16,565
Posted By elixir_sinari
See if this works for you: awk...
See if this works for you:

awk '/\<'"$var"'\>/ {getline;getline;print}' inputfile
Forum: Solaris 07-09-2012
3,735
Posted By jlliagre
The major number identifies the driver and the...
The major number identifies the driver and the minor number an index passed to the driver to be used by the kernel to access a file.

Physical devices have their driver listed in the...
16,565
Posted By elixir_sinari
Like this? awk '$0 == "'"$var"'"...
Like this?

awk '$0 == "'"$var"'" {getline;print;getline;print}' inputfile
Forum: Solaris 04-02-2005
30,139
Posted By Perderabo
SunOS/Solaris Links
Manufacturer Links
Home Page: Oracle | Hardware and Software, Engineered to Work Together (http://www.oracle.com)
Documentation: Oracle Documentation (http://docs.oracle.com)
Support: Oracle...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 07:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy